Tree Traversal
Everything on SkillVeris tagged Tree Traversal — collected across the glossary, study notes, blog, and cheat sheets.
6 resources across 1 library
Interview Questions(6)
What is a Recursive CTE and When Would You Use One?
A recursive CTE is a Common Table Expression that references itself, repeatedly building on its own previous output until no new rows are produced, making it t…
What is Recursion?
Recursion is a technique where a function solves a problem by calling itself on a smaller instance of the same problem, until it reaches a base case that stops…
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…
Iterative vs Recursive Algorithms: What is the Difference?
An iterative algorithm repeats a loop body while updating variables directly, using O(1) call-stack space, while a recursive algorithm solves a problem by call…