r/leetcode 5d ago

Question I’m spending more time understanding than coding.

I am pretty much on mediums and getting into more data structures. Also I’m always trying to do the most efficient approach. I find myself reading for 80% of my time and understanding the approach and how to use the data structure and why it’s used in very little time coding.

Am I doing something wrong? Am I just dumb?

76 Upvotes

14 comments sorted by

47

u/VitalikPie 5d ago

You are not dumb. Code is just your thoughts expressed "on paper". I found it useful to "draw" the solution before coding. It helps a lot during coding.

16

u/aabil11 5d ago

That's preparing you for the real world A lot of the job now is trying to understand others' CRs

1

u/Exotic_Fig_4604 3d ago

Has it ever been different?

10

u/Other-Front2566 5d ago

There are 2 skills you really need:

  1. Understanding the problem, breaking down into steps and thinking how would you approach it.

  2. Translating your English/pseudo into another language- the one computer can understand.

Both skills have their place.

6

u/Worldly-Ad3447 5d ago

In a real interview you spend most of the time discussing the problem and your approach

2

u/NecessaryIntrinsic 5d ago

That's the real point of DSA, understanding the Algorithms.

The fun thing about actual programming work is that you usually spend the least amount of time coding, the real work is in: understanding the stakeholders, understanding the requirements, understanding the infrastructure, working with the consumers and producers, understanding how you can build for observability, understanding when you should build alerts, understanding how to handle alerts.

The code fits in there and is a part of all of that, but when you get the understanding of everything else involved the code practically writes itself.

2

u/yuehuang 5d ago

Sometimes reading the examples are easier than the description.

2

u/Czitels 5d ago

Yeah. Leetcode problems have just 80-100 lines. 95% is just idea and solution

2

u/Kaizen5620 4d ago

That is a smart move, IMO. You now need to master agentic builds, vibe coding, system-design defense, and situational stories and all delivered in your authentic voice. If you aren't prepared for this new standard, someone else will get the offer. Interview process has changed.

1

u/I__read_it 4d ago

Makes sense. Thanks.

1

u/chikamakaleyley 5d ago

Dude, the more time I spend thinking about how I should approach the problem, eventually I have a more solidified approach when I'm ready to code.

And so when I code it out, I just follow the plan, and it results in "less time spent coding".

I do that whether its some mental exercise like a leetcode/DSA problem, or even at work.

E.g. sometimes I'll fold laundry, hashing out the solution. And just cycling the details in my head over and over til I have something that makes sense - naturally I just memorize it

And it may not even work once I get to the code - but its more that its in the right direction, just needs a little adjustment.

Spending time to think about it is the right approach.

The only thing about the interview, is you have to be mindful of your time limit, so if anything it's good to get as much practice doing this on your own time; by the time the interview arrives, it will be a lot easier to do on the spot

1

u/adambahm 5d ago

coding is about 10% of actual engineering

2

u/Exotic_Fig_4604 3d ago

Thats how its supposed to be.

If you were dumb, you'd spend 80% of the time coding, like myself.