feat(curriculum): add JS graphs and tree quiz (#65819)

Co-authored-by: Jeevankumar S <110320697+Jeevankumar-s@users.noreply.github.com>
Co-authored-by: Kolade <chrisjay967@gmail.com>
This commit is contained in:
Zaira
2026-03-31 14:47:16 +05:00
committed by GitHub
parent ba0ea71ed6
commit 20fa1de878
4 changed files with 474 additions and 1 deletions
+7
View File
@@ -5726,6 +5726,13 @@
"Before you are quizzed on graphs and trees, you should review what you've learned."
]
},
"quiz-graph-and-trees-js": {
"title": "Graphs and Trees Quiz",
"intro": [
"Graphs and Trees Quiz",
"Test what you've learned about graphs and trees with this quiz."
]
},
"lecture-understanding-dynamic-programming-js": {
"title": "Understanding Dynamic Programming",
"intro": [
@@ -0,0 +1,455 @@
---
id: 698c38eb685c30adb9767c04
title: Graphs and Trees Quiz
challengeType: 8
dashedName: quiz-graph-and-trees-js
---
# --description--
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
# --quizzes--
## --quiz--
### --question--
#### --text--
What is a graph?
#### --distractors--
A linear data structure that follows the Last-In, First-Out principle.
---
A data structure that stores multiple values of the same type that are contiguous in memory.
---
A linear data structure that follows the First-In, First-Out principle.
#### --answer--
A data structure used to represent the connections or relationships between objects or entities.
### --question--
#### --text--
Which of the following is NOT a typical scenario that can be represented using a graph?
#### --distractors--
social networks
---
transportation networks
---
communications networks
#### --answer--
temperature measurement over time
### --question--
#### --text--
Which of the following terms describes an object or entity that is part of the network depicted by a graph?
#### --distractors--
Cookie
---
Endpoint
---
CPU
#### --answer--
Node
### --question--
#### --text--
Which of the following terms describes the connections between nodes in a graph?
#### --distractors--
Gates
---
Connectors
---
Vertices
#### --answer--
Edges
### --question--
#### --text--
What is an undirected graph?
#### --distractors--
A graph where the nodes are undirected but the edges are directed.
---
A graph where the edges have a specific direction.
---
A graph where the nodes and edges connect at the midpoint.
#### --answer--
A graph where the edges don't have a specific direction.
### --question--
#### --text--
Which of the following refers to a graph in which each node is associated with a label or identifier in addition to its data?
#### --distractors--
Version labeled graph
---
Virtual labeled graph
---
Vertical labeled graph
#### --answer--
Vertex labeled graph
### --question--
#### --text--
Which of the following refers to a directed graph with at least one cycle?
#### --distractors--
Cycling graph
---
Circulating graph
---
Circular graph
#### --answer--
Cyclic graph
### --question--
#### --text--
What is a weighted graph?
#### --distractors--
A specific type of edge labeled graph that shows only the direction of connections between nodes.
---
A specific type of edge labeled graph that assigns categories instead of numerical values to edges.
---
A specific type of edge labeled graph that treats all edge weights as equal regardless of label.
#### --answer--
A specific type of edge labeled graph in which the labels on the edges represent values that can be compared and used to perform arithmetic operations.
### --question--
#### --text--
What is a directed acyclic graph?
#### --distractors--
A directed graph with one cycle.
---
A directed graph with three cycles.
---
A directed graph with two cycles.
#### --answer--
A directed graph with no cycles.
### --question--
#### --text--
Which of the following refers to a graph with two or more groups of nodes that are not connected by any edges?
#### --distractors--
Disconnect graph
---
Disconnecting graph
---
Disconnection graph
#### --answer--
Disconnected graph
### --question--
#### --text--
What is the Breadth-first search algorithm?
#### --distractors--
An algorithm that visits two nodes in one direction before moving another direction in the graph.
---
An algorithm that visits all nodes in one direction before moving another direction in the graph.
---
An algorithm that visits four nodes at a time before moving to the next level in the graph.
#### --answer--
An algorithm that visits all neighboring nodes before moving to the next level in the graph.
### --question--
#### --text--
Which of the following algorithms will follow each branch as deep as possible before it backtracks?
#### --distractors--
Data-First Search
---
Dock-First Search
---
Daemon-First Search
#### --answer--
Depth-First Search
### --question--
#### --text--
Which of the following terms represents a two-dimensional list in which the rows and columns represent the graph's vertices?
#### --distractors--
Array matrix
---
Depth matrix
---
Vertex matrix
#### --answer--
Adjacency matrix
### --question--
#### --text--
Which of the following terms represents an array or dictionary that stores all the neighbors of each node?
#### --distractors--
Cyclic list
---
Tuple list
---
Breadth list
#### --answer--
Adjacency list
### --question--
#### --text--
What must be true for a graph to be classified as a tree?
#### --distractors--
It must have at least one loop or cycle.
---
It must have at least two loops or cycles.
---
It must have three loops or cycles.
#### --answer--
It cannot have loops or cycles.
### --question--
#### --text--
Which of the following is a type of tree in which each node can have at most two child nodes?
#### --distractors--
Depth tree
---
Spatial tree
---
Linear tree
#### --answer--
Binary tree
### --question--
#### --text--
What is a Trie?
#### --distractors--
A tree data structure used to store a set of numbers.
---
A tree data structure used to store a set of dictionaries.
---
A tree data structure used to store a set of lists.
#### --answer--
A tree data structure used to store a set of strings.
### --question--
#### --text--
How does the priority queue data structure differ from a regular queue data structure?
#### --distractors--
A priority queue automatically removes duplicates before insertion.
---
A priority queue always processes elements in the order they were added.
---
A priority queue only stores elements of the same data type.
#### --answer--
A priority queue processes elements based on their priority.
### --question--
#### --text--
What are the two types of heaps?
#### --distractors--
Wide-heap and Tall-heap
---
Horizontal-heap and Vertical-heap
---
Breadth-heap and Depth-heap
#### --answer--
Max-heap and Min-heap
### --question--
#### --text--
What is the difference between a standard queue and a priority queue?
#### --distractors--
Elements are processed based on their priority in a standard queue, while a priority queue processes elements strictly in the order they are added (FIFO).
---
In a standard queue, duplicate elements are automatically removed, while a priority queue allows duplicates.
---
In a standard queue, elements are processed based on their priority, while a priority queue processes elements strictly in the order they are added (FIFO).
#### --answer--
In a standard queue, elements are processed strictly in the order they are added (FIFO), while a priority queue processes elements based on their priority rather than just insertion order.
@@ -0,0 +1,10 @@
{
"isUpcomingChange": true,
"blockLabel": "quiz",
"blockLayout": "link",
"dashedName": "quiz-graph-and-trees-js",
"helpCategory": "JavaScript",
"challengeOrder": [
{ "id": "698c38eb685c30adb9767c04", "title": "Graphs and Trees Quiz" }
]
}
@@ -332,7 +332,8 @@
"lab-adjacency-list-to-matrix-converter-js",
"lab-depth-first-search-js",
"lab-n-queens-problem-js",
"review-graphs-and-trees-js"
"review-graphs-and-trees-js",
"quiz-graph-and-trees-js"
]
},
{