Learning and working on algorithms!
inspired by: ThePrimeagen kata-machine
In my opinion, for every algorithm you learn, it’s helpful to focus on the following:
-
Understand the algorithm deeply: Be able to explain it in simple, step by step. Use flowcharts or diagrams—either on paper or with an online tool—to visualize the process.
-
Practice writing it from memory: Try to implement the algorithm without referring to any tutorials or notes. This helps reinforce your understanding.
-
Trace and analyze manually: Write the algorithm on paper, trace through the steps with sample inputs, and track how values change. Explain each step to yourself to strengthen your reasoning.
-
Focus on understanding, not memorizing: Don't just memorize the steps—understand why the algorithm works and how each part contributes to the solution.