Binary Tree
Everything on SkillVeris tagged Binary Tree — collected across the glossary, study notes, blog, and cheat sheets.
11 resources across 1 library
Interview Questions(11)
What is a Heap?
A heap is a complete binary tree stored in an array that satisfies the heap property — in a min-heap every parent is smaller than or equal to its children, giv…
What is a Segment Tree?
A segment tree is a binary tree built over an array that stores a precomputed aggregate (sum, min, max, or similar) for every contiguous sub-range at each node…
What is the Lowest Common Ancestor (LCA) Problem?
The lowest common ancestor problem asks for the deepest node in a tree that has both of two given nodes as descendants, and it is typically solved in O(n) with…
What are Inorder, Preorder, and Postorder Tree Traversals?
Inorder, preorder, and postorder are the three depth-first orders for visiting a binary tree's nodes, differing only in when the current node is visited relati…
What is Level-Order Tree Traversal?
Level-order traversal visits a binary tree one depth level at a time, left to right, by pushing the root into a FIFO queue and repeatedly dequeuing a node, vis…
What is a Min-Heap?
A min-heap is a complete binary tree, usually stored as an array, where every parent node is less than or equal to its children, guaranteeing the smallest elem…
What is a Max-Heap?
A max-heap is a complete binary tree, usually stored as an array, where every parent node is greater than or equal to its children, guaranteeing the largest el…
What is Morris Traversal?
Morris traversal is a technique for performing in-order (or pre-order) traversal of a binary tree in O(1) extra space by temporarily converting the tree into a…
What is a Threaded Binary Tree?
A threaded binary tree is a binary tree variant where null left or right child pointers are repurposed as 'threads' pointing directly to the node's in-order pr…
What is a Cartesian Tree and What Is It Used For?
A Cartesian tree is a binary tree built from a sequence of values where an in-order traversal recovers the original sequence order, and simultaneously the tree…
What is the Huffman Coding Algorithm?
Huffman coding is a greedy algorithm that builds an optimal prefix-free binary code by repeatedly merging the two least-frequent symbols into a new tree node,…