This is my LeetCode practices.
I write solutions in Python 3. I only write free algorithm problems. (No locked, shell, database or concurrency problems)
# | Title | Solution | Topics |
---|---|---|---|
1 | Two Sum | 1-Two-Sum.md | Array, Hash Table |
2 | Add Two Numbers | 2-Add-Two-Numbers.md | Linked List, Math |
3 | Longest Substring Without Repeating Characters | 3-Longest-Substring-Without-Repeating-Characters.md | Hash Table, Two Pointers, String, Sliding Window |
4 | Median of Two Sorted Arrays | 4-Median-of-Two-Sorted-Arrays.md | Array, Binary Search, Divide and Conquer |
5 | Longest Palindromic Substring | 5-Longest-Palindromic-Substring.md | String, Dynamic Programming |
6 | ZigZag Conversion | 6-ZigZag-Conversion.md | String |
7 | Reverse Integer | 7-Reverse-Integer.md | Math |
8 | String to Integer (atoi) | 8-String-to-Integer-(atoi).md | Math, String |
9 | Palindrome Number | 9-Palindrome-Number.md | Math |
10 | Regular Expression Matching | 10-Regular-Expression-Matching.md | String, Dynamic Programming, Backtracking |
11 | Container With Most Water | 11-Container-With-Most-Water.md | Array, Two Pointers |
12 | Integer to Roman | 12-Integer-to-Roman.md | Math, String |
13 | Roman to Integer | 13-Roman-to-Integer.md | Math, String |
14 | Longest Common Prefix | 14-Longest-Common-Prefix.md | String |
15 | 3Sum | 15-3Sum.md | Array, Two Pointers |
16 | 3Sum Closest | 16-3Sum-Closest.md | Array, Two Pointers |
17 | Letter Combinations of a Phone Number | 17-Letter-Combinations-of-a-Phone-Number.md | String, Backtracking, Depth-first Search, Recursion |
18 | 4Sum | 18-4Sum.md | Array, Hash Table, Two Pointers |
19 | Remove Nth Node From End of List | 19-Remove-Nth-Node-From-End-of-List.md | Linked List, Two Pointers |
20 | Valid Parentheses | 20-Valid-Parentheses.md | String, Stack |
21 | Merge Two Sorted Lists | 21-Merge-Two-Sorted-Lists.md | Linked List |
22 | Generate Parentheses | 22-Generate-Parentheses.md | String, Backtracking |
23 | Merge k Sorted Lists | 23-Merge-k-Sorted-Lists.md | Linked List, Divide and Conquer, Heap |
24 | Swap Nodes in Pairs | 24-Swap-Nodes-in-Pairs.md | Linked List, Recursion |
25 | Reverse Nodes in k-Group | 25-Reverse-Nodes-in-k-Group.md | Linked List |
26 | Remove Duplicates from Sorted Array | 26-Remove-Duplicates-from-Sorted-Array.md | Array, Two Pointers |
27 | Remove Element | 27-Remove-Element.md | Array, Two Pointers |
28 | Implement strStr() | 28-Implement-strStr().md | Two Pointers, String |
29 | Divide Two Integers | 29-Divide-Two-Integers.md | Math, Binary Search |
30 | Substring with Concatenation of All Words | 30-Substring-with-Concatenation-of-All-Words.md | Hash Table, Two Pointers, String |
31 | Next Permutation | 31-Next-Permutation.md | Array |
32 | Longest Valid Parentheses | 32-Longest-Valid-Parentheses.md | Array, Dynamic Programming |
33 | Search in Rotated Sorted Array | 33-Search-in-Rotated-Sorted-Array.md | Array, Binary Search |
34 | Find First and Last Position of Element in Sorted Array | 34-Find-First-and-Last-Position-of-Element-in-Sorted-Array.md | Array, Binary Search |
35 | Search Insert Position | 35-Search-Insert-Position.md | Array, Binary Search |
36 | Valid Sudoku | 36-Valid-Sudoku.md | Hash Table |
37 | Sudoku Solver | 37-Sudoku-Solver.md | Hash Table, Backtracking |
38 | Count and Say | 38-Count-and-Say.md | String |
39 | Combination Sum | 39-Combination-Sum.md | Array, Backtracking |
40 | Combination Sum II | 40-Combination-Sum-II.md | Array, Backtracking |
41 | First Missing Positive | 41-First-Missing-Positive.md | Array |
42 | Trapping Rain Water | 42-Trapping-Rain-Water.md | Array, Two Pointer, Stack |
43 | Multiply Strings | 43-Multiply-Strings.md | Math, String |
44 | Wildcard Matching | 44-Wildcard-Matching.md | String, Dynamic Programming, Backtracking, Greedy |
45 | Jump Game II | 45-Jump-Game-II.md | Array, Greedy |
46 | Permutations | 46-Permutations.md | Backtracking |
47 | Permutations II | 47-Permutations-II.md | Backtracking |
48 | Rotate Image | 48-Rotate-Image.md | Array |
49 | Group Anagrams | 49-Group-Anagrams.md | Hash Table, String |
50 | Pow(x, n) | 50-Pow(x,n).md | Math, Binary Search |
51 | N-Queens | 51-N-Queens.md | Backtracking |
52 | N-Queens II | 52-N-Queens-II.md | Backtracking |
53 | Maximum Subarray | 53-Maximum-Subarray.md | Array, Divide and Conquer, Dynamic Programming |
54 | Spiral Matrix | 54-Spiral-Matrix.md | Array |
55 | Jump Game | 55-Jump-Game.md | Array, Greedy |
56 | Merge Intervals | 56-Merge-Intervals.md | Array, Sort |
57 | Insert Interval | 57-Insert-Interval.md | Array, Sort |
59 | Spiral Matrix II | 59-Spiral-Matrix-II.md | Array |
60 | Permutation Sequence | 60-Permutation-Sequence.md | Math, Backtracking |
61 | Rotate List | 61-Rotate-List.md | Linked List, Two Pointers |
62 | Unique Paths | 62-Unique-Paths.md | Array, Dynamic Programming |
63 | Unique Paths II | 63-Unique-Paths-II.md | Array, Dynamic Programming |
64 | Minimum Path Sum | 64-Minimum-Path-Sum.md | Array, Dynamic Programming |
65 | Valid Number | 65-Valid-Number.md | Math, String |
66 | Plus One | 66-Plus-One.md | Array |
67 | Add Binary | 67-Add-Binary.md | Math, String |
68 | Text Justification | 68-Text-Justification.md | String |
69 | Sqrt(x) | 69-Sqrt(x).md | Math, Binary Search |
70 | Climbing Stairs | 70-Climbing-Stairs.md | Dynamic Programming |
71 | Simplify Path | 71-Simplify-Path.md | String, Stack |
72 | Edit Distance | 72-Edit-Distance.md | String, Dynamic Programming |
73 | Set Matrix Zeroes | 73-Set-Matrix-Zeroes.md | Array |
74 | Search a 2D Matrix | 74-Search-a-2D-Matrix.md | Array, Binary Search |
76 | Minimum Window Substring | 76-Minimum-Window-Substring.md | Hash Table, Two Pointers, String, Sliding Window |
77 | Combinations | 77-Combinations.md | Backtracking |
78 | Subsets | 78-Subsets.md | Array, Backtracking, Bit Manipulation |
79 | Word Search | 79-Word-Search.md | Array, Backtracking |
80 | Remove Duplicates from Sorted Array II | 80-Remove-Duplicates-from-Sorted-Array-II.md | Array, Two Pointers |
81 | Search in Rotated Sorted Array II | 81-Search-in-Rotated-Sorted-Array-II.md | Array, Binary Search |
82 | Remove Duplicates from Sorted List II | 82-Remove-Duplicates-from-Sorted-List-II.md | Linked List |
83 | Remove Duplicates from Sorted List | 83-Remove-Duplicates-from-Sorted-List.md | Linked List |
410 | Split Array Largest Sum | 410-Split-Array-Largest-Sum.md | Binary Search, Dynamic Programming |