The solution to problems in LeetCode Algorithms.
Problems | Solutions | Tags |
---|---|---|
Longest Substring Without Repeating Characters | Swift | C++ | Hash Table、Two Pointers |
Longest Palindromic Substring | Swift | |
Longest Common Prefix | Swift | |
ZigZag Conversion | Swift | |
String to Integer (atoi) | Swift | |
Generate Parentheses | Swift | Backtracking |
Implement strStr() | Swift | Two Pointers |
Count and Say | Swift | |
Letter Combinations of a Phone Number | Swift | Backtracking |
Decode Ways | Swift | Dynamic Programming |
Length of Last Word | Swift |
Problems | Solutions | Tags |
---|---|---|
Add Two Numbers | Swift | |
Swap Nodes in Pairs | Swift | |
Remove Nth Node From End of List | Swift | Two Pointers |
Remove Duplicates from Sorted List | Swift | |
Remove Duplicates from Sorted List II | Swift | |
Reverse Nodes in k-Group | C++ | |
Remove Nth Node From End of List | C++ | Two Pointer |
Reverse Linked List | Swift | C++ | |
Reverse Linked List II | Swift | |
Merge k Sorted Lists | Swift | Divide and Conquer、Heap |
Linked List Cycle | C++ | Two Pointers |
Linked List Cycle II | C++ | Two Pointers |
Sort List | Swift | Sort |
Problems | Solutions | Tags |
---|---|---|
Valid Parentheses | Swift | |
Daily Temperatures | C++ | Stack、Hash Table |
Problems | Solutions | Tags |
---|---|---|
Same Tree | Swift | DFS |
Symmetric Tree | Swift | DFS、BFS |
Lowest Common Ancestor of a Binary Search Tree | C++ | |
Binary Tree Preorder Traversal | Swift | Stack |
Binary Tree Inorder Traversal | Swift | Stack |
Binary Tree Preorder Traversal | Swift | Stack |
Balanced Binary Tree | C++ | DFS |
Validate Binary Search Tree | Swift | DFS |
Binary Tree Level Order Traversal | Swift | BFS |
Maximum Depth of Binary Tree | Swift | DFS |
Path Sum | Swift | DFS |
Problems | Solutions | Tags |
---|---|---|
Reverse Integer | Swift | |
Palindrome Number | Swift | |
Roman to Integer | Swift | |
Integer to Roman | Swift | |
Add Binary | Swift | String |
Pow(x, n) | Swift | Binary Search |
Sqrt(x) | Swift | Binary Search |
Problems | Solutions | Tags |
---|---|---|
Permutations | Swift | |
Permutations II | Swift | |
Permutation Sequence | Swift | Math |
Combinations | Swift |
Problems | Solutions |
---|---|
Valid Sudoku | Swift |
Group Anagrams | Swift |
Problems | Solutions |
---|---|
House Robber | Swift |
Climbing Stairs | Swift |
Problems | Solutions | Tags |
---|---|---|
Kth Largest Element in an Array | Swift | Heap |
Problems | Solutions | Tags |
---|---|---|
Reverse Bits | C++ |