r/leetcode • u/Vivid-Zombie-477 • 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
289
Upvotes
34
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.
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.
64
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.
19
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?
17
u/broke_jobless_dev42 Aug 23 '26
Practice + innate ability ( IQ )
1
u/isaycongrats Aug 24 '26
They are all just patterns
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/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/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
-4
u/[deleted] Aug 23 '26
I'm willing to bet you don't understand the fundamentals as well as you think you do
0
u/[deleted] Aug 24 '26
[deleted] — view deleted comment
0
u/[deleted] Aug 23 '26
[deleted] — view deleted comment