Binary Search
Algorithm:
int[] arr = { 1, 3, 4, 6, 7, 9};
int target = 7
1) Make an array element in ascending or descending order.
2) Find the middle element
3) If ( ascending order) target > middle element then search in right else search in left.
if ( descendin...
kushagrablog.hashnode.dev2 min read