Husen's Code
Here I will share my source code
BINARY SEARCH # include < iostream > int BinarySearch ( int arr [], int n , int x ) { int low = 0…
Read more# include < iostream > int findMajority ( int arr [], int n ) { // here the code goes int res = …
Read moreFinding leaders in an array Here I have written the Two approach one is naive approach which will take O(n^2) time com…
Read moreMoving Zeros to end in an array # include < iostream > void display ( int arr [], int n ) { std :: cout …
Read moreReverse an array arr[] = {a, b, c, .......}; # include < iostream > int reverse ( int arr [], int size ) { …
Read more----Naive approach---- # include < iostream > bool ifsorted ( int arr [], int size ) { for ( int i …
Read moreNaive approach # include < iostream > // naive solution 2 times traversal of the array; int getlargest ( int …
Read more
Social Plugin