
TREES

Quiz
•
Computers
•
University
•
Medium

KRATI GUPTA
Used 34+ times
FREE Resource
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 ________ .
Similar Resources on Wayground
10 questions
7.5 Standard Methods of Solution Cambridge IGCSE 0478

Quiz
•
10th Grade - University
10 questions
Quiz despre B+ Tree

Quiz
•
University
12 questions
AppsDev-Quiz-1-HTML

Quiz
•
University
10 questions
Lesson 3: Boolean Logic and Logic Gates

Quiz
•
University
11 questions
Binary Search Trees

Quiz
•
University
10 questions
ASK (F3) BAB 3. PEMBANGUNAN ALGORITMA

Quiz
•
3rd Grade - University
9 questions
Data structures

Quiz
•
University
10 questions
Trees

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University