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.
What is the purpose of graph traversal?
Think about why we explore all nodes in a graph.
Name the two main graph traversal methods.
They're often acronymed. Think about their first letters!
What does BFS stand for?
Focus on the first letter of each word.
True or False: DFS uses a queue to manage the vertices to explore next.
Recall how each method handles vertices.
Design an algorithm to determine if a graph contains a cycle using DFS.
Think about the recursion stack.
Implement BFS to find the shortest path between two nodes in an unweighted graph. Describe your approach.
Consider how you manage the queue and backtrack the path.
6 more questions in this section. Enroll free to practise them all.
Enroll free