Search Insert Position

Searching ยท easy

Given a sorted array `nums` and a `target`, implement `searchInsert(nums, target)` returning the index where target is, or where it would be inserted to keep the array sorted.

Learning resources

Loading...

Run your code to see results.