CPSC 2120 - DAY 16 JUNE 7, 2016 ================================================================================ Adjacency list is more efficient with smaller edges, while matrix is more efficient for larger edges. Disjoint sets 0 1 2 3 4 5 6 7 A B C D E F G H |-1|-1|-1|-1|-1|-1|-1|-1| int array ^ initialized values -1 Depth-First Sort Maintain an array and stack to track visited nodes Breadth-First Sort Starts with a given node Then visits nodes adjacent in some specified order like ripples in a pond