1. 2 D Array
- 如果是在左上到右下的斜线的话,在同一条斜线上的x - y 相等, (x, y) 是该点的坐标
- 如果是在左下到右上的斜线的话,在同一条斜线上的x + y 相等, (x, y) 是该点的坐标
ex. [(1, 1), (1, 2), (1, 3)]
[(2, 1), (2, 2), (2, 3)]
[(3, 1), (3, 2), (3, 3)]
2. Sorted array
- Rotated sorted array
[LeetCode] 189. Rotate Array_Easy tag: Array
Recover Rotated Sorted Array
Reverse Words in a String
[LeetCode] 796. Rotate String_Easy **KMP
- Merge sorted array
[LeetCode] 88. Merge Sorted Array_Easy tag: Two Pointers
Merge Sorted Array II
[LeetCode] 4. Median of Two Sorted Arrays_Hard tag: Array
- Subarray
[LeetCode] 53. Maximum Subarray_Easy tag: Dynamic Programming
[LeetCode] 121. Best Time to Buy and Sell Stock_Easy tag: Dynamic Programming
Best Time to BUy and Sale Stock I, II, III
- Two pointers
[LeetCode] 15. 3Sum_Medium tag: Array
2 - Sum, 3 Sum, 4 - SUm, K- SUM, 3- Sum Closest.
Partition Array
SOrt letters by Case
[LeetCode] 75. Sort Colors_Medium tag: Two pointers
INterleaving Negative & positive numbers
3. Palindrome
[Palindrome] Check any substring in a s is a palindrome or not.
[LeetCode] 131. Palindrome Partitioning_Medium tag: DFS, backtracking, Palindrome