Which of the following statements is true about Binary Search Trees (BSTs)?
DRAINER CS : Data Structures Final Review

Quiz
•
Computers
•
University
•
Easy
Ashtin Hall
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
BSTs are not suitable for storing data in a sorted order
The right subtree of a node in a BST contains values greater than the nodes value
BSTs can never be unbalanced
BSTs have a time complexity of O(n) for insertion and search operations
2.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Which of the following operations can not be performed in O(log n) time in a perfect Binary Search Tree?
Insertion
Deletion
Searching for a given key
In-order traversal
3.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What is the time complexity of finding the minimum value of a balanced Binary Search Tree
O(n)
O(1)
O( log n)
O(n log n)
4.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Which of the following statements is true about the following code?
The function prints the height of the tree
The function prints the tree in post-order traversal
The function prints the tree in in-order traversal
The function prints the tree in pre-order traversal
5.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Which of the following is not a property of Binary Search Trees
A node can have at most two children.
All nodes at the same level have the same value
All nodes in the left subtree of a node have values less thatn the nodes valu
All nodes in the right subtree of a node have values greater than the nodes value
6.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Which of the following statements is true about the following python code?
The function deletes the node with the given key from the tree
The function inserts a new node with the given key in the tree
The function searches for the node with the given key in the tree
The function returns the minimum value in the tree
7.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What could be the worst-case time complexity of inserting a node in a Binary Search Tree?
O(log n)
O(n log n)
O(n)
O(1)
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
Quiz 1_DSA

Quiz
•
University
11 questions
Binary Search Trees

Quiz
•
University
10 questions
BCSC0006 Trees

Quiz
•
University
20 questions
DATA STRUCTURES

Quiz
•
University
20 questions
Algorithm questions

Quiz
•
12th Grade - University
10 questions
DS Quiz1

Quiz
•
University
20 questions
Data Structures

Quiz
•
University - Professi...
13 questions
Data Structure and Algorithms Semi-Final Examination

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade