# Two Sum

Python Algorithmic thinking Searching Public New

Python

Python is a widely used, high-level, general-purpose, interpreted, dynamic programming language. Having a basic familiarity with the programming language used on the job is a prerequisite for quickly getting up to speed.

Algorithmic thinking

When designing and/or analyzing an algorithm or data structure, it is important to consider the performance and structure of an implementation. Algorithmic thinking is one of the key traits of a good programmer, especially one working on complex or performance-critical code.

Searching

Every programmer should be familiar with data-searching methods, as they are very common in data-analysis processes.

Public

*Public questions*(free account) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.

New

This is a part of latest question addition to our question library.

Write a function that, when passed a list and a target sum, returns two distinct** **zero-based indices of any two of the numbers, whose sum is equal to the target sum. If there are no two numbers, the function should return *None*.

For example, *find_two_sum([3, 1, 5, 7, 5, 9], 10)* should return a single *tuple* containing any of the following pairs of indices:

- 0 and 3 (or 3 and 0) as 3 + 7 = 10
- 1 and 5 (or 5 and 1) as 1 + 9 = 10
- 2 and 4 (or 4 and 2) as 5 + 5 = 10

Python 3.6.2

- Example case: Wrong answer
- Distinct numbers with and without solutions: Wrong answer
- Duplicate numbers with and without solutions: Wrong answer
- Performance test with a large list of numbers: Wrong answer