
BinarySearchTree
Authored by Irina Rabaev
Computers
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the minimum number of nodes in a complete binary tree with height 3?
3
4
8
15
Answer explanation
A complete binary tree of height 3 has levels 0 to 3. The minimum number of nodes occurs when all levels are fully filled except possibly the last. Thus, the minimum is 2^3 = 8 nodes.
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the maximum number of nodes in a complete binary tree with height 3?
3
8
15
31
Answer explanation
A complete binary tree of height 3 has levels 0 to 3. The maximum number of nodes is calculated as 2^(h+1) - 1, where h is the height. For h=3, it is 2^(3+1) - 1 = 15. Thus, the correct answer is 15.
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
We print the preorder traversal of BST of height h. Where the minimum element will appear?
First
Last
Among the first h+1 elements
Among the last h+1 elements
Answer explanation
In a preorder traversal of a BST, the root is visited first, followed by the left subtree and then the right subtree. The minimum element, being the leftmost node, will appear among the first h+1 elements.
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Suppose we remove the root in the following tree. What will be the new root?
74
62
55
41
Answer explanation
When the root is removed, the new root is typically the largest value in the left subtree or the smallest in the right subtree. Here, 62 and 55 are valid candidates, with 62 being the largest in the left subtree.
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Claim: It is possible that the following sequence is a preorder traversal in a BST? 24,15,12,4,17,20,13,32,37
True
False
Answer explanation
The sequence cannot be a preorder traversal of a BST because after 17, 20 should be less than 24 but greater than 17, which violates the BST property. Thus, the claim is False.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
9 questions
CHAPTER 5 ONLINE QUIZ
Quiz
•
University
10 questions
ECM3434 Business Analysis 1 - Data Modelling
Quiz
•
University
10 questions
PYTHON_CHAPTER 6
Quiz
•
University
10 questions
Digital Logic
Quiz
•
12th Grade - University
10 questions
CS1010 Lab 02
Quiz
•
University
10 questions
Round - 3
Quiz
•
University
10 questions
pictoblox_lvl_1
Quiz
•
2nd Grade - University
10 questions
Software Engineering Unit1
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University