Question | Answer |
1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. public int[] twoSum(int[] nums, int target) | 1. Complement = target - nums[i]; 2. Find complement in map |
Want to create your own Flashcards for free with GoConqr? Learn more.