My Blog

Algorithm Notes: My Problem-Solving Journey

2025-01-18 Hanlun Wang

Welcome to my Algorithm notes section! This is where I document my journey through algorithmic problem-solving, share my thought processes, and break down solutions to various coding challenges.

What You'll Find Here

In these notes, I'll be sharing:

  • My approach to problems: The mental models and steps I take when tackling a new challenge
  • Solution breakdowns: Detailed explanations of solutions with time and space complexity analysis
  • Alternative approaches: Different ways to solve the same problem and why one might be better than another
  • Common patterns: Recognizing and applying recurring problem-solving patterns
  • Gotchas and pitfalls: The mistakes I've made so you don't have to make them too

Why I'm Documenting My Algorithm Journey

There's something powerful about explaining a concept to others that solidifies your own understanding. By documenting my solutions and thought processes, I'm not only creating a resource for others but also strengthening my own problem-solving skills.

Whether you're preparing for technical interviews, improving your algorithmic thinking, or just enjoy solving puzzles like I do, I hope you'll find value in these notes.

How to Use These Notes

Each entry will focus on a specific problem or set of related problems. I'll typically structure each note with:

  1. Problem statement: A brief overview of the challenge
  2. Initial thoughts: My first impressions and approach considerations
  3. Solution development: Walking through how I arrived at the solution
  4. Code implementation: The actual code with comments
  5. Reflection: What I learned and how I might approach similar problems in the future

Feel free to follow along, offer alternative approaches in the comments, or reach out if you're stuck on a similar problem!

Let's grow together as problem solvers.

# The journey begins...
def algorithm_journey():
    while True:
        problem = get_next_problem()
        think(problem)
        solution = solve(problem)
        learn_from(solution)
        share(solution)  # You are here!

On this page