3 ms·
The intent was that node.children would be the giveaway. The question is about BFS, and you'll notice that only one of the answers references the node's childre
by ammon 9y ago
The intent was that node.children would be the giveaway. The question is about BFS, and you'll notice that only one of the answers references the node's children (in a sensible way). The intent was that that would be enough to answer it without knowing python queue syntax (for what it's worth, I know python well and don't have the deque API in my head)
- fenomas 9y agoThanks for the explanation, please see sibling comment for context. I think that a comment like # assume "node" is an object with "value" and "children" properties would make this question clearer.