Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
Define what a graph is.
Think about how they are used to represent relationships.
What does an entry of '1' in an adjacency matrix indicate?
Refer back to how edges are represented.
What does an adjacency list do?
Remember, adjacency lists focus on connections!
True or False: An adjacency matrix is preferable for very sparse graphs.
Think about what 'sparse' means in the context of edges.
Given the following adjacency matrix, write the corresponding adjacency list.
Remember to look at each row and note neighbors.
Design an algorithm that utilizes breadth-first search to determine if a path exists from vertex A to vertex B in a graph.
Consider how to track visited vertices to avoid cycles.
4 more questions in this section. Enroll free to practise them all.
Enroll free