1/6
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is a graph?
A data structure consisting of nodes and pointers
Directed graph
The pointers point in one direction
Undirected graph
The pointers do not specify a direction
Weighted graph
Each pointer has a value that represents a relationship between the nodes
What are graphs used for?
resource allocation in operating systems
mapping road networks for navigation systems
Breadth-first search
starts at the root node, visits each neighbouring node before moving to the next depth
uses the queue data structure (B&Q)
FIFO
Depth-first search
starts at the root vertex, explores each branch as far as possible before backtracking
uses the stack data structure (DS)
LIFO