LC: 170. Two Sum III Data structure design - spiralgo/algorithms GitHub Wiki
170. Two Sum III - Data structure design:
The Essence: The aim of the question is to inform the problem-solver on how to design a class in the programming language of choice. It is a variant of the classical Two-Sum question.
Details: To implement the find method:
- We can sort the list in order to be able to use Binary Search.
- We can use a map implementation (for example HashMap) to use the number as a key and its complementary as a value.