Leetcode – Search Insert Position

Name: Search Insert PositionDifficulty: EasyDescription: Return the index of target, or where target should be in a sorted array Example: Input: nums = [1,3,5,6], target = 5 Output: 2 Input: nums = [1,3,5,6], target = 2 Output: 1 Input: nums = [1,3,5,6], target = 7 Output: 4 The solution was quite simple, but I complicated […]