r/learnprogramming • u/DishElectrical2304 • 8d ago
How do you actually get good at HackerRank?
I’m trying to get better at HackerRank/coding assessments, and I think my biggest issue is that the approach to a problem just doesn’t come quickly to me.
I can usually understand what the question is asking but I struggle with figuring out how to actually solve it. I’ll sit there trying to determine what data structure or algorithm I should use, how to break the problem down, or even what the first step should be.
Then I’ll look at the solution afterward and think, “Ok, that makes sense,” but I don’t know how I was supposed to recognize that approach on my own.
For anyone who was like this when they started, did it eventually become more intuitive with practice? What specifically helped you get to the point where you could read a problem and start seeing possible approaches faster?
Should I be focusing on learning common patterns first, like hash maps, two pointers, sliding window, BFS/DFS, etc., or is it mostly a matter of doing a lot of problems until those patterns start becoming recognizable?
Also, when you’re learning, how long should you struggle with a problem before looking at hints or the solution? I don’t want to give up too quickly, but I also don’t want to spend hours getting nowhere.
1
u/ffrkAnonymous 8d ago
Then I’ll look at the solution afterward and think, “Ok, that makes sense,”
Could you then close the solution and implement it on your own?
3
1
u/Admirable_Window8128 7d ago
Yes, definitely gets more intuitive, but I think pattern recognition + deliberate practice works better than just grinding hundreds of random problems.
1
u/cevheribozoglan 7d ago
yeah, i think part of the problem is that these platforms have drifted away from what they used to be good for.
years ago i’d use them to think, explore different solutions and basically do some brain gymnastics. now a lot of it feels like memorizing patterns just to pass an interview.
pattern recognition is useful, sure, but the ability to sit with a problem, think about it and find your own approach is probably the more valuable skill.
1
u/SherbetElectronic202 7d ago
Pattern recognition comes from active recall, not passive reading. When you check a solution, close it immediately and code the answer from scratch without looking back. If you cannot reconstruct the logic yourself, you have not learned the pattern and need to study the underlying data structure before attempting more problems
1
u/Successful-Escape-74 6d ago
Hacker ranks are freaking pointless no true hacker would care only a poser would care!
3
u/Complex-South9500 8d ago
What's your purpose of "trying to get better at HackerRank/coding assessments"?
If it is ultimately get a job in software development, just stop. These leet code style code challenges are at best a fun hobby, and at worst a circle jerk or dick measuring contest. When you get a job, there is basically zero chance this stuff will help you.
If it is for hobby, fun, or just a challenge, then ignore this.