Concept Flow - Floor and Ceil in Sorted Array
Start with sorted array and target
Initialize low=0, high=array_length-1
While low <= high
Calculate mid = (low+high)/2
Compare array[mid
low=mid+1
After loop ends
Floor = array[high
Ceil = array[low
Return floor and ceil values
We use binary search to find positions where floor and ceil values lie by adjusting low and high pointers until they cross.
