DEV Community

Cover image for Learn Number of Islands, Invert Binary Tree, and Course Schedule with Step-by-Step Visualization in DSA View View πŸ‘€πŸ‘€

Learn Number of Islands, Invert Binary Tree, and Course Schedule with Step-by-Step Visualization in DSA View View πŸ‘€πŸ‘€

nyaomaru on September 02, 2026

Hoi hoi! I’m @nyaomaru, a frontend engineer who is surprised by how cold it is in the Netherlands even though it’s still summer. 😸 Have you used ...
Collapse
 
gnomeman4201 profile image
GnomeMan4201

The Number of Islands walkthrough makes the visited state logic really clear. Have you considered showing recursive DFS and an explicit stack version side by side? Seeing how the same traversal keeps track of pending work in each version would be interesting.

Also im jealous you have cold weather you live. Where I live it is unbelievably hot and I much prefer cold. Big fan of your work.

Collapse
 
nyaomaru profile image
nyaomaru

Thank you so much! 😸

An iterative DFS using an explicit stack can also be visualized, but there isn’t a built-in side-by-side comparison yet.

I really like the idea of showing the call stack and explicit stack as two different ways of tracking pending work. I’d love to add that! πŸ‘€πŸ‘€

And haha, I’d happily send you some cold weather. If we could average our temperatures, it would probably be perfect for both of us. 😹

Collapse
 
koda2026 profile image
Harun - solo dev

@nyaomaru HOW ARE YOU

Collapse
 
nyaomaru profile image
nyaomaru

Hi! I'm still learning, working, and developing every day. 😸
Especially lately, I've been working on new features in is-kit for TypeScript compiler use cases! πŸš€

Collapse
 
koda2026 profile image
Harun - solo dev

Okay its a long time we spoken ( not taht longπŸ˜…)

Thread Thread
 
nyaomaru profile image
nyaomaru

Of course I remember you! 😸
You’re the genius developer coding on Android! πŸ’ͺ
How have you been?

Thread Thread
 
koda2026 profile image
Harun - solo dev

Iam not genius @nyaomaru

Thread Thread
 
nyaomaru profile image
nyaomaru

Haha 😸
Knowing that you’re not a genius is actually a good mindset!

Socrates would probably call that a kind of wisdom. πŸ˜‚

Keep learning and building, that’s more important than being a genius! πŸš€

Collapse
 
ndcodes profile image
Nnamdi Felix Ibe

Hoi hoi! 😸

"The swap happens on the way back" is the line that made this for me. Most explanations stop at "recursion, swap the children," which teaches nobody anything.

And Course Schedule is less academic than it looks. That's a topological sort, which is what Terraform and systemd do every time you run them. The "nothing has indegree zero" case is just the circular dependency error people hit on a Monday morning.

Lovely series. πŸ‘€πŸ‘€

Collapse
 
nyaomaru profile image
nyaomaru

Dank u wel! 😸

Course Schedule is actually one of the problems I struggle with, so your Terraform and systemd analogy makes a lot of sense to me too.

There are so many real-world systems built around dependencies, and circular dependencies can show up everywhere. 😹

I’m really happy if this article helped even a little. Thank you so much for the thoughtful comment! πŸ‘€πŸ‘€

Collapse
 
technogamerz profile image
π“π‘πž π‹πšπ³π² 𝐆𝐒𝐫π₯

The cover image looks really cool, and the article is truly enjoyable!!

Collapse
 
nyaomaru profile image
nyaomaru

Thx! 😸
I’m especially happy you liked the cover image, because I put a lot of effort into it! πŸ‘€βœ¨

Please enjoy DSA View View too!