Define Graph
Define neighbour
two nodes connected by an edge
Define degree
number of other nodes that a node is connected to
Define loop
edge that connects node to itself
Define cycle
closed path
Uses of graphs
Define undirected graph
allows you to traverse in either direction between nodes
Define directed graph
edges have direction, you move between nodes in specified direction
Define weighted graph
values associated with the edges
Define adjacency matrix
Define adjacency list
Advantages of adjacency lists
-space efficient for graphs with few edges (sparse graphs)
Disadvantages of adjacency lists
-requires linear search when determining presence of an edge
Advantages of adjacency matrix