Husen's Code
Here I will share my source code
Finding 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#include <iostream> int getlargest(int arr[], int n) { int res = 0; for (int i = 1; i < n; i++) { if…
Read moreCheck for k th bit; I have solved the problem in two ways 1] Using left shift operator (<<); 2] Using right shif…
Read more
Social Plugin