Category: Algorithm

05
May
2017

How to take limited constraint 1

code: 1<=N<=10^5 1<=A[i]<=10^9 1<=M<=10^9 Source: https://www.facebook.com/groups/bengaliprogramming/permalink/717276125110930/

05
May
2017

How to take limited constraint 1<=A[i]<=10^9 Array in C/C++ code for OJs

code: 1<=N<=10^5 1<=A[i]<=10^9 1<=M<=10^9 Source: https://www.facebook.com/groups/bengaliprogramming/permalink/717276125110930/

05
May
2017

Hackerearth: Linear Search Algorithm Problem

Default : Source: https://www.hackerearth.com/practice/algorithms/searching/linear-search/tutorial/ code: /* hackerearth linear search test */ #include<stdio.h> int main() { //long long int…

04
May
2017

Algo: Linear Search

code: /* Count Frequency in an Array(Optimized Version) Syed Ahmed Zaki — 2017 */ #include<stdio.h> int linear_search(int…

04
May
2017

Interview: Find Occurances in an Array – Binary Search Application

Some theory: code: /* Count Frequency in an Array Syed Ahmed Zaki — 2017 */ #include<stdio.h> int…

04
May
2017

Algorithm: Binary Search

iterative code: #include<stdio.h> int binarysearch(int A[],int n,int x) { int low=0, high=n-1; while(low<=high) { int mid=(low+high)/2; //eta…