Please enable JavaScript.
Coggle requires JavaScript to display documents.
Graphs - Coggle Diagram
Graphs
Structure
Vertices
Edges
undirected
directed
Weighted graph
graph with numbers (weights) assigned to its edges.
cycle / path
Topological sort
not unique
directed acyclic graphs (DAG)
not every graph has a topological ordering (cycles)
Find a way to iterate through the graph accessing nodes within the direction of the graph
Implementations
Adjancy matrix
n x n matrix
Adjacency lists
each vertex stores all vertices adjacent to him in a lit
Searches
DFS
Depth first search
BFS
Breadth-First Search
queue