FYH Blog

Quantitative Changes Lead to Qualitative Changes.

Two Sum

LeetCode 1 Two Sum

1. Two Sum There are two different method. The first one is brute force enumeration. Enumerate all possible pairs until find the result. However, the algorithm has high time complexity, $O(n^2)$. ...