Your question is Two Sum Coding. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
While processing item scores for a Coupang ranking workflow, find two distinct array elements whose values add up to a specified target. Return their indices in ascending order.
Implement two_sum(nums, target) using a hash map. You may assume that every valid input contains exactly one solution, and the same array element cannot be used twice.
nums, a list of integers, and target, an integer.[i, j] where i < j and nums[i] + nums[j] == target.def two_sum(nums, target):