I'm seeking advice from more experienced developers on how to effectively study algorithms. I have a solid background in programming and build systems regularly, but I often struggle with algorithm problems in interviews. I've been reading a book and tackling LeetCode challenges, but I find it difficult to implement solutions without looking them up online. I'm currently writing down explanations and practicing solving problems multiple times, but I still feel stuck. What tips do you have for developing a deeper understanding of algorithms and improving my computational thinking?
6 Answers
Stop re-reading solutions too soon! Challenge yourself to struggle with a problem for 30-45 minutes before looking it up. Afterward, try implementing it from scratch without your notes—that's what really helps things stick.
In my CS program, we had a mandatory class on algorithm design and analysis, which started with data structures. How well do you know data structures? That foundational knowledge is key!
Honestly, a lot of working developers don't actively study algorithms like this; they just use them as needed. What do you actually want to achieve? Are you looking to solve specific problems or improve your reasoning? Knowing your goals might help in directing your study efforts better.
When I first started, I found it helpful to focus on 4-6 core algorithm patterns (like two pointers or BFS). Solve a few problems for each and timebox your efforts to 30 minutes before turning to solutions. Writing it by hand and revisiting the problem days later also helped with retention. Build confidence slowly and create small snippets for common cases, then practice under time pressure for interviews—it really paid off for me in just a few weeks!
Algorithm problems really test your ability to creatively use limited tools to solve a challenge. It’s not about memorization but developing your problem-solving skills. If you’re not solving the problems yourself, you won’t improve.
When I was in university, I relied heavily on textbooks and a notebook. I would doodle out the algorithms to better understand their logic and performance. Then, I'd try coding them from memory to test my understanding, not focusing too much on matching textbook versions, but rather on grasping the core concepts. That's a method that really helped me retain the information.
Totally! That practice of read-try-fail-repeat really sticks with you.
Any specific textbooks you found useful? I'm teaching high school programming and would love my students to grasp algorithms early on.

Great tips! Timing yourself with mock interviews made a big difference for me too.