6. Search Insert Position
Given a sorted array and a target value, return its index or the index where it would be inserted.
उदाहरण 1:
इनपुट: nums = [1,3,5,6], target = 5 आउटपुट: 2
उदाहरण 2:
इनपुट: nums = [1,3,5,6], target = 2 आउटपुट: 1
सीमाएँ:
1 <= nums.length <= 10^4