Your question is LeetCode Two Sum. 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.
An Oracle Health EHR workflow receives a list of integer-coded record values and a target total. Given an integer array nums and an integer target, return the indices of the two distinct elements whose values add up to target.
Use each array element at most once. You may assume that every valid input contains exactly one solution. Return the two indices in ascending order.
nums, a list of integers, and target, an integer.[i, j] where i < j and nums[i] + nums[j] == target.two_sum(nums, target).def two_sum(nums, target):