Difficulty Level: EASY
Problem Statement:
Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it was inserted in order.
The problem "Search Insert Position" asks us to find the index of a target value in a sorted array. If the target is not found, we need to return the index where it would be if it were inserted in order. We assume that the array does not contain duplicates and is sorted in ascending order.
Input:
nums = [1,3,5,6], target = 5
Output:
2 // 5 is found at index 2 in the array