← All topics
Binary Trees & BST Quiz: questions with answers
8 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. For this tree, what is the INORDER traversal? (type the values separated by spaces) (code)
- Q2. For the same tree, what is the PREORDER traversal?
- Q3. What is the maximum depth (counting nodes) of that tree?
- Q4. Which traversal of a Binary Search Tree visits values in sorted order?
- Q5. Which data structure does level-order (BFS) traversal use?
- Q6. Why is checking only left.val < node.val < right.val NOT enough to validate a BST?
- Q7. Which tree questions are usually solved with DFS returning a value from the children (postorder)? (select all that apply)
- Q8. What is the time complexity of visiting every node of a binary tree with n nodes?