Solution to LeetCode #1: Two Sum (Python)

Top 0.2% of solutions

Jacob Bennett

--

This is an easy LeetCode problem (source).

Jump to the solutions ↓

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

You may assume that each input would have exactly one solution, and you may not use the same

--

--

Jacob Bennett

Staff Software Engineer @ Medium • https://jacob.bio • I write about software engineering, product design and development, and leadership in tech.