Concept Flow - Why Binary Search and What Sorted Order Gives You
Start with sorted array
Set low = 0, high = length-1
Calculate mid = (low + high) / 2
Compare target with array[mid
Set high=mid-1
Repeat until low > high
Target not found
Binary search works on sorted arrays by repeatedly dividing the search range in half, comparing the target with the middle element, and narrowing down the search until the target is found or the range is empty.