© 2026 Hashnode
When navigating a 2D grid, the shortest path depends entirely on how you are allowed to move. In many competitive programming problems, you are restricted to horizontal and vertical movements (Manhattan Distance). However, what happens when you can m...

When working with binary trees, we often need to identify specific nodes based on their depth. A classic challenge is finding the smallest subtree that contains every single deepest node in the tree. In this post, we’ll break down the logic, visualiz...
