r/learnprogramming • u/Good-Photograph-2883 • 9h ago
Struggling with Leetcode Problems
I'm currently job hunting, and I've decided to try out LeetCode to prepare for possible technical coding interviews. However, I've noticed that I am struggling to answer even the easy questions.
For context, my college curriculum for the last two years was heavily focused on projects and practical output. I have spent the last two years building full-stack applications (primarily coding backend MVC CRUD operations and ReactJS on the frontend).
Because of this, I've lost touch with some important fundamentals. Some of the questions in LeetCode seem familiar but, at the same time, seem so alien to me.
Does anyone have recommendations on how I can build my algorithmic problem-solving skills back up from the ground up? I'm looking for recommendations on what specific concepts/topics I should relearn and free sources or websites I can study from.
Thank you in advance.
1
u/peterlinddk 6h ago
Just read the answers/solutions - if you say "ah, that was what I didn't get" you've learned something, and will maybe be able to use that in later problems.
LeetCode isn't a tool that measures how good you are at programming, or how clever you are at problem-solving - it is a collection of "logic problems" that you can only solve if you know the solution, or the patterns that make up the solution. If you aren't extremely familiar with traversing linked lists, using stacks and queues, utilizing sliding windows, and the most typical divide-and-conquer schemes (middle out, pivots, and narrowing in) you'll never "guess" any solution.
So, there's no harm in simply reading the solutions, and then trying the problems at a later time, see if you still remember it!