JNAYEH Sirinesirinejnayeh.hashnode.dev·Jul 26, 2024Binary Lifting: My First Time Applying DP on Binary TreesBinary lifting is causing a revolution in tree-based computations, offering a clever way to handle complex tree queries efficiently. This dynamic programming approach allows for quick navigation through tree structures, making it a game-changer for v...BinaryTrees
Ramandeep Singhramandeepsingh.hashnode.dev·Sep 20, 2023Distance Queries - CSESHello everyone, I hope you are learning well, In this blog, we shall learn to solve yet another application of the lowest common ancestor of two nodes which is present in the tree algorithm section of the CSES problem set. So, Let's define the proble...388 readsBinary lifting
Amit Kushwahaamitkushwahatech.hashnode.dev·Jan 21, 2023Lowest Common Ancestor of a Binary TreeGiven a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q...leetcode