Facebook Pixel

How long should I try a problem before looking at the solution?

At least 20 to 30 minutes of genuine effort, not 5 minutes of staring and then giving up. The struggle phase is not wasted time, it's the actual learning. Your brain is building problem-solving pathways during that struggle even when it doesn't feel like progress. That said, there's a difference between productive struggle and spinning in circles. If you've genuinely tried multiple approaches and you're completely stuck after 30 to 45 minutes, looking at a hint or the approach is reasonable. Just don't look at the full solution immediately.

Verify This Answer

Cross-check this information using these trusted sources:

More FAQs in Why Do I Understand DSA Theory But Can't Solve Problems on My Own?

Completely normal, and it happens to most people preparing for technical interviews. Understanding a solution someone explains to you and independently constructing a solution are two different skills. The first one develops from watching and reading. The second one only develops from actually attempting problems without guidance. Most people spend too much time on the first and not enough on the second, which is why the gap shows up.

Because solving a problem immediately after learning a technique is not a real test. Your brain knows what tool to apply because you just studied it. The actual skill you need in an interview is recognizing the right approach from a cold start, with no context clues about which chapter it's from. This is why mixing problem types in practice and revisiting old problems after a gap of a few days is so important. That time delay removes the hint and forces your brain to work harder.

Not really, at least not in the way that builds interview confidence. If you needed a hint to get started or to figure out the core insight, you haven't solved the problem independently yet. That's fine as a step in the learning process, but you should track hint-assisted solves separately and revisit those problems later without any help. The goal is to eventually close every problem you've worked on without needing assistance.

Still have questions?

Browse all our FAQs or reach out to our support team

Want to upskill yourself?

Our courses are taking a Coffee break, but your curiosity shouldn't. Stay engaged with namastedev linkedin, youtube, discord and other resources while you wait.

0
Please Login.
Please Login.