Question DSA-QUE-0070
HardWhat does 0-1 BFS use to find shortest paths when edge weights are only 0 or 1?
- A.
A stack
- B.
A deque: 0-weight edges go to the front, 1-weight edges to the back
- C.
A hash map
- D.
A priority queue
Sign up free to see the answer and a step-by-step explanation.