Now all solutions are only based on Python. But, I will include some
# | Title | Solution | Basic idea (One line) |
---|---|---|---|
1 | Two Sum | Python | 1. Hash O(n) and O(n) space. 2. Sort and search with two points O(n) and O(1) space. |
2 | Add Two Numbers | Python | Take care of the carry from lower digit. |
3 | Longest Substring Without Repeating Characters | Python | 1. Check every possible substring O(n^2). 2. Remember the character index and current check pos, if character index >= current pos, then there is duplicate. |
- This project borrowed some code from qiyuangong.