BFS Memory Requirements

How large does the queue Q get?

Let a be the average size of an adjacency list Adj[u].

Let d be the current distance from S in the search.

When d is: The size of Q is:
0 1