Interview Guides

Given a sorted array of distinct integers nums and an integer target, return the index if target is found. If it is not found, return the index where it should be inserted to keep the array sorted. Implement the solution in O(log n) time.
1 <= len(nums) <= 10^4-10^4 <= nums[i], target <= 10^4nums is sorted in ascending ordernums are distinct