Graphs general Flashcards
Representations: Set
“big buckets” of nodes and edges - edges store connecting node information
Representations: Adjacency list
Array of LinkedLists, where each list contains the indeces of nodes that that node is adjacent to
Representations: Adjacency matrix
2D array (size numNodes^2) containing whether two nodes are adjacent
Depth-first search
Starting at an inputted node, traverses and explores all “children” in the paths going out from that node
DFS: implementation ADT
Stack
Breadth-first search
Starting at an inputted node, explores the remainder of the graph by “radiating out”
BFS: Implementation ADT
Queue
Dijsktra’s (dyke-stra) shortest paths algorithm: (unweighted) Basic concept?
BFS
Dijsktra’s (dyke-stra) shortest paths algorithm: (directed) Basic concept?