Chapter quiz · Trees

Test what you learned.

8 questions on Trees. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

Trees — Chapter Quiz

Eight questions on tree traversals, BST property, BST deletion, depth vs height, LCA, and AVL balance factor.

0/ 9
  1. Question 1
    1

    Which traversal of a valid BST visits nodes in ascending (sorted) order?

  2. Question 2
    2

    BFS (level-order traversal) of a tree uses which data structure as its auxiliary?

  3. Question 3
    3

    Deleting a node with two children from a BST replaces it with:

  4. Question 4
    4

    What is the difference between the depth of a node and the height of a tree?

  5. Question 5
    5

    The Lowest Common Ancestor (LCA) of two nodes p and q in a BST can be found in O(h) time by:

  6. Question 6
    6

    An AVL tree maintains balance by ensuring the heights of the left and right subtrees of every node differ by at most 1.

  7. Question 7
    7

    A complete binary tree with height h has between 2^h and ___ nodes.

  8. Question 8
    8

    Which of the following traversals can reconstruct a unique binary tree? (Select all that apply)

    Select all that apply.

Pick an answer — instant feedback as you go.