Hi there! I'm Lane. Do you feel that there are too many problems (over 3,300) on the LeetCode and you can't finish them all? Or do you forget how to solve the problems you did last time? If you can master some solution patterns, this will happen less often.
Here, I will provide you with common problem-solving patterns so that you don't waste time on problems that are not often tested in interviews.
Solutions for languages such as Python, C++, Java, JavaScript, C#, Go, Ruby, etc. will also be provided. If you have better solutions, welcome to create an issue or PR!
I have planned a learning route for you. You just need to do the problems in the order they are listed. You can skip the more difficult problems and do them later.
- 503. Next Greater Element II was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 509. Fibonacci Number was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 198. House Robber was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 213. House Robber II was solved in Python, JavaScript, Go.
- 337. House Robber III was solved in Python, JavaScript, Go and 2 solutions.
- 416. Partition Equal Subset Sum was solved in Python, Java, C++, JavaScript, C#, Go, Ruby and 2 solutions.
- 1049. Last Stone Weight II was solved in Python, Java, C++, JavaScript, C#, Go, Ruby and 2 solutions.
- 494. Target Sum was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 474. Ones and Zeroes was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 518. Coin Change II was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 377. Combination Sum IV was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 322. Coin Change was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 279. Perfect Squares was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 139. Word Break was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 121. Best Time to Buy and Sell Stock was solved in Python, JavaScript, Go.
- 122. Best Time to Buy and Sell Stock II was solved in Python, JavaScript, Go.
- 714. Best Time to Buy and Sell Stock with Transaction Fee was solved in Python, JavaScript, Go.
- 123. Best Time to Buy and Sell Stock III was solved in Python, JavaScript, Go.
- 188. Best Time to Buy and Sell Stock IV was solved in Python, JavaScript, Go.
- 309. Best Time to Buy and Sell Stock with Cooldown was solved in Python, JavaScript, Go.
- 674. Longest Continuous Increasing Subsequence was solved in Python, Java, JavaScript, C#.
- 300. Longest Increasing Subsequence was solved in Python, Java, JavaScript, C#.
- 718. Maximum Length of Repeated Subarray was solved in Python, Java, JavaScript, C#.
- 1143. Longest Common Subsequence was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 1035. Uncrossed Lines was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 53. Maximum Subarray was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 392. Is Subsequence was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 583. Delete Operation for Two Strings was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 72. Edit Distance was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 739. Daily Temperatures was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 496. Next Greater Element I was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 42. Trapping Rain Water was solved in Python, Java, C++, JavaScript, C#, Go, Ruby and 2 solutions.
- 84. Largest Rectangle in Histogram was solved in Python, Java, C++, JavaScript, C#, Go, Ruby.
- 797. All Paths From Source to Target was solved in Python, Java, C++, JavaScript, C#, Go, Ruby and 2 solutions.
- 200. Number of Islands was solved in Python, Java, C++, JavaScript, C#, Go, Ruby and 3 solutions.
More LeetCode problems will be added soon...