Array & string - cocoder39/coco39_LC GitHub Wiki
for dirty problem, try a dirty example, then find out clue.
encode/decode
- 171. Excel Sheet Column Number
- 168. Excel Sheet Column Title
- 273. Integer to English Words
- 43. Multiply Strings
reverse
- 344. Reverse String (two pointers, divid-and-conquer)
- 189. Rotate Array
- 186. Reverse Words in a String II
- 151. Reverse Words in a String (dirty)
- 917. Reverse Only Letters
range
- 163. Missing Ranges (dirty)
- 228. Summary Ranges (dirty)
- 523. Continuous Subarray Sum (prefix sum and leverage reminder)
intersection
- 14. Longest Common Prefix
- 349. Intersection of Two Arrays (hash, binary search, two pointers)
- 350. Intersection of Two Arrays II (hash, binary search, two pointers)
matrix
- 73. Set Matrix Zeroes
- 48. Rotate Image
- 1428. Leftmost Column with at Least a One
- Spiral Matrix
- diagonal
read4
array
compress and decompress
text justification
stack
propagation
Permutation
- 31. Next Permutation
- 1850. Minimum Adjacent Swaps to Reach the Kth Smallest Number
- 60. Permutation Sequence
Matching
str to int
Misc
- 287. Find the Duplicate Number (in-place modification, fast-slow pointers, binary search)
- 1146. Snapshot Array
- 755. Pour Water
- 336. Palindrome Pairs
- 1257. Smallest Common Region
- 1404. Number of Steps to Reduce a Number in Binary Representation to One
- 468. Validate IP Address
- 205. Isomorphic Strings