Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What does BFS stand for?
Remember the first part of the name!
Name one way to represent a graph.
Think about how we discussed graphs in class.
What is the time complexity of BFS using an adjacency list?
Think about the connections in sparse graphs.
True or False: BFS can only find the shortest path in weighted graphs.
Consider the nature of BFS's exploration.
You have a graph with 10 vertices and the edges {(1,2), (2,3), (3,4), (4,5), (1,6), (6,7), (6,8), (5,9)}. Describe the BFS traversal starting from vertex 1.
Keep track of the levels while traversing!
Given an example of both an adjacency matrix and list for the edges mentioned above, calculate the time complexity of BFS for both representations.
Make sure to consider the number of edges and how they relate.
4 more questions in this section. Enroll free to practise them all.
Enroll free