
TREES
Authored by KRATI GUPTA
Computers
University
Used 34+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree?
15, 20, 10, 23, 25, 42, 35, 39, 30
15, 10, 23, 25, 20, 35, 42, 39, 30
10, 20, 15, 23, 25, 35, 42, 39, 30
15, 10, 25, 23, 20, 42, 35, 39, 30
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)?
2
3
4
6
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Suppose that we have numbers between 1 and 100 in a binary search tree and want to search for the number 56. Which of the following sequences CANNOT be the sequence of nodes examined?
{10, 75, 64, 43, 60, 57, 56}
{79, 14, 72, 57, 16, 53, 56}
{90, 12, 68, 34, 62, 45, 56}
{9, 85, 47, 68, 43, 57, 56}
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
A Binary Search Tree (BST) stores values in the range 37 to 573. Consider the following sequence of keys.
I. 81, 537, 102, 439, 285, 376, 305
II. 52, 97, 121, 195, 242, 381, 472
III. 142, 248, 520, 386, 345, 270, 307
IV. 550, 149, 507, 395, 463, 402, 270
Suppose the BST has been unsuccessfully searched for key 273. Which all of the above sequences list nodes in the order in which we could have encountered them in the search?
I and III only
III only
III and IV only
II and III only
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
A binary search tree is generated by inserting in order the following integers:
50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24
The number of nodes in the left subtree and right subtree of the root respectively is
(4, 7)
(7, 4)
(3,8)
(8,3)
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
A binary search tree is used to locate the number 43. Which of the following probe sequences is not possible?
61 52 14 17 40 43
10 65 31 48 37 43
2 3 50 40 60 43
81 61 52 14 41 43
7.
FILL IN THE BLANK QUESTION
2 mins • 1 pt
The postorder traversal of a binary tree is 8, 9, 6, 7, 4, 5, 2, 3, 1. The inorder traversal of the same tree is 8, 6, 9, 4, 7, 2, 5, 1, 3. The height of a tree is the length of the longest path from the root to any leaf. The height of the binary tree above is ________ .
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
10 questions
Quiz - CSE
Quiz
•
University
10 questions
Hands-on Modul 3
Quiz
•
University
10 questions
System Analysis & Design
Quiz
•
University
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
10 questions
CS100||MsWord
Quiz
•
University
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
10 questions
Creating tables in HTML
Quiz
•
University
10 questions
Website Usability and UX
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade