You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#TwoSumII In this we are given a sorted array and a target and we need to find 2 numbers such that they add up to target.The function returns the indices of the two numbers such that they add up to the target where index 1 must be less than index2
#There is exactly one solution and we cant take the same element twice
#In the easy method, for each element we can check if the array has target-element,also it'll be easy since only one such pair exists
#After this we can also try to analyse a solution with hashmap