What is the height of a binary tree with 15 nodes in the best-case scenario?

Exploring Trees and Graphs Quiz

Quiz
•
Computers
•
12th Grade
•
Medium
S Uwadiae
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
3
4
5
6
Answer explanation
In a balanced binary tree, the height is minimized. For 15 nodes, the best-case height is 4, as a complete binary tree with 15 nodes has 4 levels (2^4 - 1 = 15). Thus, the correct answer is 4.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a characteristic of a complete binary tree?
All levels are completely filled except possibly the last, which is filled from left to right.
All nodes have two children.
All leaf nodes are at the same level.
It is a binary search tree.
Answer explanation
A complete binary tree is defined by having all levels fully filled except possibly the last, which must be filled from left to right. This distinguishes it from other types of binary trees, making the first choice correct.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a graph, what is the term used to describe a path that starts and ends at the same vertex without repeating any edges?
Cycle
Circuit
Loop
Walk
Answer explanation
A circuit is a path in a graph that starts and ends at the same vertex without repeating any edges. While a cycle also starts and ends at the same vertex, it can repeat vertices, making 'circuit' the correct term for this definition.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data structure is used to implement a breadth-first search (BFS) on a graph?
Stack
Queue
Priority Queue
Linked List
Answer explanation
A breadth-first search (BFS) uses a queue to explore nodes level by level. Nodes are enqueued as they are discovered and dequeued for exploration, ensuring that all nodes at the current depth are processed before moving deeper.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of searching for an element in a balanced binary search tree (BST)?
Answer explanation
In a balanced binary search tree (BST), the height is logarithmic relative to the number of nodes, allowing search operations to be performed in O(log n) time. This makes O(log n) the correct choice for search time complexity.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true for a tree data structure?
It can have cycles.
It is a type of graph.
It must be a binary tree.
It has no root node.
Answer explanation
A tree is a type of graph characterized by its acyclic nature and hierarchical structure. It does not have cycles, can have various forms (not just binary), and must have a root node.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a directed graph, what is the term for a vertex with no incoming edges?
Sink
Source
Isolated
Terminal
Answer explanation
In a directed graph, a vertex with no incoming edges is called a 'Source'. It can send edges to other vertices but does not receive any. A 'Sink' is the opposite, having no outgoing edges.
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
ASK Tingkatan 3 : Algoritma

Quiz
•
12th Grade
11 questions
Understanding Binary Search Algorithm

Quiz
•
12th Grade
8 questions
2.3.1(f) Binary Search

Quiz
•
12th Grade
13 questions
Binary Number System

Quiz
•
9th - 12th Grade
10 questions
Data Structures & Algorithms

Quiz
•
12th Grade
15 questions
Linear and Binary Search Quiz

Quiz
•
12th Grade
11 questions
Understanding Linear Search Algorithm

Quiz
•
12th Grade
10 questions
Algorithms

Quiz
•
9th - 12th Grade
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
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

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

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University