Find the Insert Position (Lower Bound)
arr[i] ≥ target. If target exists, it's the first
occurrence. If not, it's where target should be inserted.
Problem: Find the smallest index where
arr[i] ≥ target.
Logic:
• If arr[mid] ≥ target: This could be our answer, but
there might be a smaller index. Save it and search LEFT.
• If arr[mid] < target: Too small, search RIGHT.
Result: Returns the position where target exists OR should be inserted to maintain sorted order.
Time Complexity: O(log n)