
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
What is the height of a binary tree with 15 nodes in the best-case scenario?
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 Wayground
15 questions
Programming basics

Quiz
•
12th Grade
10 questions
ICT 10,11 D.PRAGASH(DIP IN ICT,B.ED(R)

Quiz
•
10th - 12th Grade
10 questions
Search engines

Quiz
•
1st - 12th Grade
10 questions
informatika

Quiz
•
7th Grade - University
15 questions
CPIT 201 Algorithms

Quiz
•
12th Grade - University
10 questions
Linear Data

Quiz
•
12th Grade
10 questions
PENILAIAN HARIAN 2

Quiz
•
11th Grade - University
10 questions
Graph Representation Quiz (AQA CS A-level)

Quiz
•
12th Grade
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
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade