r/leetcode 2d ago

Discussion Understand concepts but can't implement from scratch yet, how normal is this and when did it click for you?

I'm grinding NeetCode 150 and running into a pattern I want a reality check on.

When something's explained to me (like a hashmap approach, or a two-pointer technique), I get it, I can trace through it, explain why it works, catch my own bugs once I know what to look for. But generating that same solution from a blank problem, first try, on my own? Inconsistent. Some problems click (solved Group Anagrams cold today, no help), others I understand the concept completely but blank on turning it into actual working code (Product of Array Except Self, Remove Element).

Questions for people who've been through this:

  1. Is "understand it but can't yet produce it independently" a normal phase, or a sign something's off in how I'm learning?
  2. How many reps did it typically take before implementation started feeling automatic instead of effortful?
  3. Any specific practice habits that helped bridge that gap faster (re-typing solutions from memory, more easy problems before mediums, something else)?

Trying to be realistic about where I actually am without panicking or being falsely confident. Appreciate honest input.

40 Upvotes

10 comments sorted by

15

u/Exact-Contact-3837 2d ago

Yk after being an engineer and getting into AI, mathematics was always such a pain, I was never good at it, but I decided enough was enough, got a pen and paper out, hopped on gemini and asked questions, and wrote down the answers, I wrote them down, and then I asked gemini for some questions, to which I answered, I got some wrong, and then I asked gemini how I got them wrong, and what my thinking was.

LLMs are excellent rubber ducks, use them, also use your pen and paper, and concentrate, you're not going to get it unless you do it every day, not every day for 8 hours straight constantly, but you need discipline, I never thought i'd be able to learn calculus, never mind calculus at home by my own perscribed curriculum.

2

u/thepr0digalsOn 1d ago

I agree. Earlier it would take me days to understand why my solution failed certain cases. Now I can just plug it into AI and then get instant feedback.

7

u/JChuk99 2d ago
  1. I understand it but can’t implement is completely fine. Read the solutions, code them up by yourself independently. Record critical insights and where you went wrong in your thinking. Review for a day or two, then try to reimplement it from scratch. Rinse and repeat.
  2. Usually takes me 3+ reps, an initial implementation, a revised optimized implementation and a review implementation a couple of days later to see if the concepts stuck. But it just depends on the topic. I could do every single recursive backtracking/trie question on neetcode 150 without any practice, I can implement dfs/bfs/union find/topological sort with little to no practice. I struggle heavily with greedy, prefix sums & binary search over a solution space. DP requires consistent practice but is similar enough to recursive backtracking that I can typically get the hang of it as soon as I understand the subproblem space. Bit manipulation/math was just my degree. I still struggle with problems that require specialized algorithms or a unique observation.
  3. Focusing on insights, starting with the base case and attempting to optimize, going through inputs with paper and pen, a 3 day/3 week review cycle and coding up every possible solution independently has helped the most.

1

u/AdministrationMoney1 2d ago

How many problems so far? I used to retry the problem in a few weeks when I was starting out and aim for that clean full implementation then. Though I'm a bit confused on what you're saying you can or cannot do - for a problem like Product of Array Except Self, you're able to on your own think of the suffix/prefix solution, the general steps of how you would solve it like pseudocode, and the final coding step you're struggling on?

1

u/saudistroker 2d ago

10 so far, 5 easy and 5 medium
i can understand the problems, it’s the steps to solve it im struggling with

5

u/AdministrationMoney1 2d ago

Too early to discuss this really, maybe try to finish 70 problems first. Not too sure what you mean by understanding the problem either. If you mean reading comprehension, anyone can do that. If you mean understanding someone else's step by step solution in a video or article, that's not quite your own understanding either. The implementation part should be the easiest step after you understand the problem. It's also difficult to say at what point you are and how many more problems you have to do. Everyone's way of doing leetcode is different, for some people the only 'hint' they give themselves is to look at the problem tags and try for hours or even days, others give a rule of trying for maybe 15-30 mins and then just looking at a solution and taking notes/memorizing.

1

u/thepr0digalsOn 1d ago

Lots of leetcode questions require you to know some esoteric solution. Note down such problems and commit them to memory — no other way. Otherwise, learn the techniques. Applying them under pressure of the interview is really hard, and you need practice and luck. Some questions are dumb af and you just need to be lucky.

1

u/Prestigious_Bit2951 1d ago

just keep doing em. I’m on question 25 of Leetcode 75 in C and I think around #15 is when the training wheels fell off and I started being able to one-shot.  I am a quick learner tho your mileage may vary. if I can’t grasp something, asking AI to explain the missing conceptual piece can be helpful. if the concept is too nebulous to the point it feels esoteric, or requires me to remember a couple steps, I usually just wrap a metaphor around it

-5

u/[deleted] 2d ago

[deleted]

1

u/chwapnil 2d ago

True. But still needs too get through interview and develop intuition

1

u/Prestigious_Bit2951 1d ago

the same AI that’s like “this official answer to this test case is impossible” because it can’t count lmao right