Insert the following numbers into a binary search tree in order: 9, 20, 7, 8, 10, 22, 21. Where will the number 10 be located?

Midterm Review

Flashcard
•
Engineering
•
University
•
Hard
Quizizz Content
FREE Resource
Student preview

25 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
As the right child of 8.
2.
FLASHCARD QUESTION
Front
Insert the numbers 15, 10, 20, 5, 12, 17, 25 into a BST. What is the in-order traversal of the tree?
Back
5, 10, 12, 15, 17, 20, 25
3.
FLASHCARD QUESTION
Front
What is the time complexity of merge sort?
Back
O(nlogn)
4.
FLASHCARD QUESTION
Front
Which of the following correctly describes a stack and a queue?
Stack: Last In, First Out (LIFO);
Queue: First In, First Out (FIFO).
Back
Stack: Last In, First Out (LIFO);
Queue: First In, First Out (FIFO).
5.
FLASHCARD QUESTION
Front
Write a recursive method to count the total number of leaf nodes in a binary tree. What is the base case for this recursive function?
Back
When the node has no children.
6.
FLASHCARD QUESTION
Front
What is the height of the following binary tree?
10
/ \
5 15
/ \
3 7
Back
3
7.
FLASHCARD QUESTION
Front
Which of the following is true for a binary search tree (BST)?
Options:
All left children are greater than the parent node.
All right children are smaller than the parent node.
All left children are smaller and all right children are greater than the parent node.
It is not necessary for a BST to have ordered nodes.
Back
All left children are smaller and all right children are greater than the parent node.
Create a free account and access millions of resources
Similar Resources on Quizizz
24 questions
PSUEDOCODE 2 CAPGEMINI

Flashcard
•
Professional Development
23 questions
Comp 210 MT2 Review

Flashcard
•
University
20 questions
EKG TERMINOLOGY

Flashcard
•
Professional Development
15 questions
1342 - Final Review Questions - Test #4

Flashcard
•
University
15 questions
Hypothesis testing Part 1

Flashcard
•
12th Grade
15 questions
Intro & Anatomy of the Heart

Flashcard
•
12th Grade
21 questions
Electrocardiogram (ECG) Basics

Flashcard
•
11th Grade - University
20 questions
Linked List

Flashcard
•
Professional Development
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