Watch others solve Binary Trees interview questions, see how they did, and learn from their mistakes.
Get step-by-step instructions on how to approach and solve common technical interview questions.
Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure.
Given a binary tree, extract all the leaves in repeated succession into a list of lists by starting at the bottom and working your way upwards.
Given the root of a complete binary tree, return the number of nodes in the tree.
The boundary of a binary tree is the concatenation of the root, the left boundary, the leaves ordered from left-to-right, and the reverse order of the right boundary.
Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
Interview prep and job hunting are chaos and pain. We can help. Really.