Your question is Two Sum with 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.
At Stripe, you are given a list of transaction values and a target amount. Return the indices of the two distinct elements whose sum equals the target.
Implement a function two_sum(nums, target) where:
nums is a list of integerstarget is an integerYou may assume:
def two_sum(nums, target):