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
/*Problem Statement: Given an array of integers nums[] and an integer target, return indices of the two numbers such that their sum is equal to the target.
Note: Assume that there is exactly one solution, and you are not allowed to use the same element twice.
Example: If target is equal to 6 and num[1] = 3, then nums[1] + nums[1] = target is not a solution. */
vector<int> twoSum(vector<int>& nums, int target) {