2. Data Structures
Trees — Quiz
Test your understanding of trees with 5 practice questions.
Practice Questions
Question 1
Which of the following describes a binary tree where every level, except possibly the last, is completely filled, and all nodes at the last level are as far left as possible?
Question 2
In a binary search tree (BST), what is the time complexity for inserting a new node in the average case?
Question 3
Consider a binary search tree (BST). If you need to find the node with the smallest value, which traversal strategy would be most efficient?
Question 4
Which of the following is a disadvantage of using a tree data structure compared to a linked list for sequential data access?
Question 5
What is the primary characteristic that differentiates a tree from a general graph data structure?
