======Graphs====== * Nodes, Edges * No root node like trees * Edges can contain data, like strength of conection, etc. * Edges can have a direction, "Directed Edge" * "Undirected Graph", Edges with no direction * Graphs can loop back to the start, unlike Trees * "DAG" - Directed Acyclic Graph, - Graph that does not loop * ====Connectivity==== Disconnected graph has one or more nodes not connected to the rest of the graph. Edge List or 2D or 3D List ====Adjacency==== {{:adjacency_list.png?400|}}{{:adjacency_matrix.png?400|}} ====DFS==== Depth First Search Use a Stack. ====BFS==== Breadth First Search Use a Queue ====Shortest Path Problem==== If the edges are **unweighted**, the shortest past is found via BFS. ====Dijkstra's Algorithm====