Given a sorted array of distinct integers nums and a value target, return the index where target is found. If target is not present, return the index where it would be inserted to keep the array sorted. Must run in O(log n).
1 ≤ nums.length ≤ 10⁴-10⁴ ≤ nums[i], target ≤ 10⁴nums holds distinct values sorted in ascending order.Standard binary search, but on a miss, return lo — that is the insertion point.
2