site banner

Tinker Tuesday for December 30, 2025

This thread is for anyone working on personal projects to share their progress, and hold themselves somewhat accountable to a group of peers.

Post your project, your progress from last week, and what you hope to accomplish this week.

If you want to be pinged with a reminder asking about your project, let me know, and I'll harass you each week until you cancel the service

1
Jump in the discussion.

No email address required.

I've been melting my brain with leetcode. Some highlights.

I really enjoy doing a Topological Sort, or Kahn's Algorithm. Almost every graph problem I see, I take a minute and have a think if it can be solved with a topological sort.

I took a day to really try to understand Monotonic Stacks or Deques, because on the face of it I couldn't grasp what they were doing at all. But after manually stepping through a few examples of the algorithm on paper it clicked. Been redoing a bunch of stack problems seeing if they can be solved with a Monotonic solutions.

Floyd's Cycle Detection remains a blind spot for me. I mean, I get it, but I often fail to perceive that a given problem can be reinterpreted as a cycle detection problem.

Solving shortest cost problems in a graph with a minheap was something I'm not sure I ever learned in school. I always remember doing that with a breadth first search queue.

I wonder if that had anything to do with learning all this in C/C++ without any standard template libraries. If we wanted to use a minheap to solve a problem, we would have had to code one up ourselves, and I'm not sure we were taught that in undergrad. Least I never was. Doing the leetcode problems in modern languages, or even C++ with STL seems mostly to be a matter of picking the right data structure off the shelf and solving the problem with it and/or having heard of the algorithm you never would have come up with yourself.

Also, having been a software engineer for 20 years already, it has me looking back over my career. Over all the stitching together of off the shelf libraries I've done, wondering if at any point I could have done a better job with any of this. The answer is absolutely not.

Ah well.

Whenever I do coding interview training I have to brush up on min heaps and try to think of whenever I would could have used them and the answer is: never.

Deques on the other hand, maybe 7 times in the last 30 years. But it's never been performance critical enough to matter.

You'll see minheaps a bit under Dijkstra's algorithm in the networking and -adjacent spheres, but it's so well-known as the Default Solution for those use cases you're either going to have it under several layers of abstraction, or you're really doing something weird. I've had to hand-build it once, and I don't think the end product ever actually hit anywhere outside of a toy environment.

Oh. Okay I've used a min heap once in my life in that case. I somehow forgot. Probably because it was a pairing heap whereas all of the coding interviews that ask you to hand write one want to see an array based binary heap.