Why do we need the queue? You say @ [], "The primary data structure for breadth-first traversal is, of course, a queue" but please explain why that statement is obvious (and therefore, the "of course" part). Precisely, how does a queue lend itself to being so optimal for breath-first traversal? |