Two Sum II - Input Array Is Sorted
Intuition Keep a map of the numbers, and lookup for it’s complement based on target. Approach Loop through all elements, check if the complement of the current number is already in the store. In case it’s true, return current index and the index stored. in case it’s not, add the current number to the store. The key here is to store the current number in the map, not the complement ...