Your question is Two Sum Array Target. 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 numeric events in a HashedIn by Deloitte engineering workflow, you need to identify whether two recorded values produce a required target total. Given an integer array nums and an integer target, return the indices of two distinct elements whose values add up to target.
Return the indices in any order. 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] such that nums[i] + nums[j] == target.def two_sum(nums, target):