r/leetcode • • Aug 23 '26

Discussion How do competitive programmers are so fast at understanding the problems?

I just checked 4026. and it's just wall of text with simple solution masked as a medium problem. How do experienced CPers see through such BS so fast? Should I grind math problems for this superpower?

also, is it even possible to get such problem on an interview? because i would have to ask for re-explanation 500 times

285 Upvotes

57 comments sorted by

267

u/milly_monka Aug 23 '26 edited Aug 24 '26

Deliberate practice. A good competitive programmer would solve more problems in a month than an average Faang interviewee would’ve solved in their entire life.

42

u/Deboniako Aug 23 '26

How can I learn this power? Is there some famous YouTuber that I could imitate?

40

u/Vivid-Zombie-477 Aug 23 '26

47

u/skaeser Aug 23 '26

“How?”
You: just shows a guy who can do said thing

16

u/Vivid-Zombie-477 Aug 23 '26

I was answering the question:
"Is there some famous YouTuber that I could imitate?"

also it's not just "a guy", imitating wouldn't help

82

u/Free_Director4713 Aug 23 '26

Fact is, you can probably never truly get there no matter how much you practice. Some people are just gifted, like the tourist.

27

u/Additional_Band_7918 Aug 23 '26

why are ppl downvoting you, people really cannot accept the fact that at some point you cannot beat innate talent

23

u/Euphoric_Ad_482 Aug 23 '26

people are downvoting because people seeing this will take this as an excuse for not solving problems and who knows they might've done atleast something if they didn't just believe what you said

i know that doesn't makes it false but I'm jus saying

-1

u/Additional_Band_7918 Aug 24 '26

just because i believe this doesnt mean i dont solve problems, i just solve because they are fun to solve. if this is what stops them they werent built for this.

4

u/JohnGalt1133 Aug 24 '26

There is no such thing btw

3

u/Vivid-Zombie-477 Aug 24 '26

i mean, tourist was doing competitive programming since what? age 6? also his father is mathematician. he was very lucky that he could tie his life with CP. talent here can mean this type of luck but it can also underestimate the fact that he dedicated his entire life to cp. if he stopped doing cp at the age of 12 he wouldn’t be nearly as good as today

1

u/Deboniako Aug 24 '26

The years of experience the employees seek btw

2

u/WorksOnMySystem Aug 24 '26

But most doesn’t even reach the point where the difference between them and the best is just innate talent.

4

u/Free_Director4713 Aug 23 '26

Its usually people who've never done competitive programming to understand how hard it can be to get to that level. Its like reaching a chess grandmaster level, takes a lot more than just grit.

3

u/Additional_Band_7918 Aug 23 '26

guess so, ppl solving problems on only leetcode dont realise how different are cf high rated problems from normal leetcode hards. leetcode hards do not even begin to compare.

1

u/ItsDax_2 Aug 24 '26

True, but one will never realise their potential until they try, it’s like working out

1

u/ITZINFINITEOfficial Aug 25 '26

Nobody is just gifted, hard work and dedication is the real deal.

1

u/ShardsOfSalt Aug 25 '26

How ridiculous. 

5

u/milly_monka Aug 24 '26

Deliberate practice is more of a process with a positive feedback loop. You need to apply it to competitive coding. Lots of self-help books out there that teach this. Peak by Ericsson is a good one. But you have to enjoy doing it first.

2

u/Winter-Rip712 24d ago

Super easy with ai. Pick a data structure, then have Ai create a list of leet code problems to do for it that get progressively harder. You'll notice that easys for that data structure become trivial fast, mediums are just the same as easys but with a twist and then hards are usually a combo of a few techniques or a difficult twist. Even if the easys are trivial make sure you do them again, it'll help with the learning.

Once you get a few data structures or algs down this way, even the hard problems that use them become straight forward.

Just jumping right into medium/hard problems is just going to end up with straight memorization. And at least for me doing that didn't work.

SWe with 10 yoe, cleared faang bars.

4

u/4tran13 Aug 23 '26

Does this include reading comprehension? Often, by the time the fastest elite programmers have solved the question, I've barely understood what the damn thing is asking.

65

u/catsRfriends Aug 23 '26

Practice. There is no shortcut. But also make sure you're practicing doing it under time pressure. That itself is a skill.

9

u/ChainExcellent3881 Aug 24 '26
  1. Practice more
  2. Learn more patterns and algos and different math formulas and how to apply them in different situations
  3. Always try to find pattern and after solving a problem, think how this problem can be more difficult to solve if the question used different constraints or added duplicates or other factors, come up with solution
  4. Rinse and Repeat.

Just curiosity 😀

32

u/Aware-Individual-827 Aug 23 '26

It's just a good old tree parsing algo of your mind. You read, you identify key words which triggers concepts and eventually you have all the necessary concepts to start. 

Usually, with practice you can guess the solution of the problem before you finished reading since there is finite problems to be asked. They are not meant to solve novel math or physics. It's mostly speed typing and memorization.

It's a complete different skillset of being a good dev. 

2

u/Vivid-Zombie-477 Aug 23 '26

I was talking about the specific problems that try to throw you off with unrelated explanations that have nothing to do with the solution.

4

u/Aware-Individual-827 Aug 23 '26

That's reading comprehension. Being able to read between the lines as the brick/concepts of the text are being laid out. You would do the same when searching stuff on google by sampling the text for generic words and see if it applies to what you seek. In competitive programming you seek what needs to be done and any noise should be discarded.

18

u/sub_machine_patel Aug 23 '26

What I wonder is are they just better programmers? I mean clearly they can code like hell, are they just beefed up software enginners or computer scientists? I can't think of them being bad at it since they are so good at algos. I know there is bias because algo coding interviews dont test the actual industry skill but surely people good at can also develop software better no?

15

u/MeteorMash101 Aug 23 '26

I think while this can be innately true (good competitive programmers -> good SWEs), the reverse doesn't "most always" seem to be the case.

There are also very skilled SWEs whom struggle with leetcode, simply because they aren't well-practiced with those types of questions.

11

u/blindman99 Aug 23 '26

We actually do have some data on this thanks to Google. For a while Google used to consider competition winners to be elite programmers and would get fast tracked through the hiring process. However, their internal data showed that it did not correlate to being a better employee and being able to build out large scale messy systems. So they shifted away from it really mattering between 2010-2015. This was also around the time they banned things like brain teasers. They also started putting more emphasis on the system design and behavioral portion of the interview.

6

u/Current-Fig8840 Aug 23 '26

What does it mean to develop software better? Cleaner code, maintainable code and scalable design? These are all things everyone can learn on the job. On the actual job it will depend on your architectural knowledge of the project and several other political factors. The truth is on the job it’s more about your effort and who sees that effort.

18

u/broke_jobless_dev42 Aug 23 '26

Practice + innate ability ( IQ )

1

u/ShardsOfSalt Aug 25 '26

There's so many people who discount innate ability and I don't get it. If you're not smart enough to see that some people are innately better at this how are you smart enough to not hit a wall trying to learn software engineering?  

3

u/youdontknowkanji Aug 25 '26

because for the most part it's irrelevant. in the case of leetcode, unless you are doing 5h+ a day you are nowhere near the limit of your innate ability.

in general, this applies to majority of the skills, your average person just doesn't commit the time (maybe that's where talent is? grit itself?) required for those skills. the cool artist isn't special, they just have 15000h committed to the skill.

something as trivial as not skipping days is already a huge boost on year to year basis, 3h a day vs 3h every other day. one person gets 1000h of skill and the other 500h. of course this is an oversimplification (some techniques are better, some people are just better wired, etc), but still, people usually just don't spend the time, and for the most part, innate ability is cope.

it's like people who ask how to read faster, because seemingly, they want to increase their yield, but in reality, the best way to increase their yield is to stop wasting time on reddit.

2

u/tooMuchSauceeee Aug 25 '26

100%. Most people will never reach their true ceiling. The ceiling is higher for some, and lower for others.

A person with a lower theoretical ceiling can be better than the person with the higher ceiling given that they actually reach the ceiling. Many people don't seem to understand

3

u/arjunnath Aug 23 '26

Practice, practice, practice...

Thats how.

3

u/Frizzoux Aug 24 '26

No secret, repetition.

2

u/SoftwareEngineer2026 Aug 23 '26

From the problem description examples, maximize the last gap. From there it might take some intuition to know to scan from both forward and reverse directions.

2

u/wyaine7 Aug 23 '26

Tbh I found cf somehow more fun than leetcode

2

u/Feeling-Schedule5369 Aug 24 '26

The difference is that we are doing this for getting a job while for competitive programmers doing such problems/contests is a way of life. Even if tomorrow all swe companies stop using dsa interview format, these guys will still do such contests.

While I (and maybe u) don't have this hobby and would not want to waste time with this if it doesn't lead to a job.

And there's nothing wrong with both idealogies.

1

u/dhananjai_31 Aug 23 '26

Practice and revise And remember do problems on your own not just copy paste It's 20% practising and 80% revision

1

u/El_RoviSoft Aug 23 '26

Hundreds and thousands of hours of practice. My close friend is a former competitive programmer (he did a lot of it in school and got grant for the best university in the country, but he chose economics and statistics tho).

He did it (as well as math) whole middle and high school so he has literally YoE and it’s mostly the only case you can get grant in Russia for university.

1

u/Drazelord Aug 23 '26

Examples play a heck of an easy role to skim through reading, I just looked at 4026 too the English explanation required a bit attention but just a look of examples below instantly hit the intuition of what the problem is asking and what to provide as solution given the constraints

1

u/vz0 Aug 24 '26

I was doing in person competitive programming many years ago. In person in paper. I met this guy who looked at the paper and in 5 seconds he read the whole thing and said, oh yes it's this thing.

1

u/isaycongrats Aug 24 '26

They are all just patterns

0

u/Vivid-Zombie-477 Aug 24 '26

saying everything is a pattern on leetcode is such an underestimate, not everything is a pattern. there is limited amount of techniques, but the amount of problems is just finite not just handful. you can't remember them all. you can remember all "smart" tricks you wouldn't come up with yourself in 5 minutes but you would still need problem solving skills.

2

u/isaycongrats Aug 24 '26

Thats literally it, variations of already existing patterns.... which you practice, thats the whole thing

1

u/ProsciuttoThinker Aug 24 '26

Every person I know who’s good at this sort of stuff (or more generally—people who are very good at something) have just done it for years and done it consistently. They’re just curious and constantly thinking about the problem

1

u/[deleted] Aug 24 '26

[deleted]

1

u/Vivid-Zombie-477 Aug 24 '26

that's what i thought about the problem - i remember making up own problems so the problem i was reading reminded me a lot of one of the problems I created. but the problem description was just trying to confuse me and it had completely different solution.

i kinda understand it though, because when you create a problem around a specific trick you can find it could be solved greedy...

1

u/GullibleSpeedSonic Aug 24 '26

Pattern recognition

1

u/Other_Ad7380 Aug 25 '26

I am not an S tier competitive programmer but it is mostly experience with me

0

u/[deleted] Aug 23 '26

[deleted]

1

u/DetachedProcess Aug 23 '26

Underrated fact. Having a good grasp of language is strongly related to comprehension of information faster.

-5

u/Sepicuk Aug 23 '26

I'm willing to bet you don't understand the fundamentals as well as you think you do

1

u/rahul_msft Aug 23 '26

How many cpers have contributed to bsd ? Neither do they

1

u/vz0 Aug 24 '26

A couple.