Graph

  • Representation
    • Adjacency list
      • space and time
      • Robust and can be modified to incorporate different variants of graphs
      • Difficult to determine existence of an edge.
      • Good for sparse graph
    • Adjacency matrix
      • space and time
      • Easily determine edge existence
      • One bit per edge for unweighted graph
      • Good for dense or reasonably small graph
  • Searching the graph