Graph BFS — Reasoning Check

Model transitions, simultaneous sources, discovery, and distance units.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. Word Ladder starts at cold and ends at warm. The dictionary is [cord,card,ward,warm,word,worm]. What shortest sequence length is returned?
2. Rotting Oranges begins with rows [2,1,1,1] / [0,0,1,1] / [2,1,1,1]. All initial rotten oranges act simultaneously. How many minutes are required?
3. Unweighted BFS starts at S with edges S→A, S→B, A→C, B→C. A debug trace shows C entering the queue twice before either copy is removed. Which invariant would prevent this?

Select one answer.

4. In Snakes and Ladders, a roll from square 1 lands on 7. Square 7 jumps to 12, and square 12 itself lists a jump to 16. Which BFS successor represents this single roll?

Select one answer.

5. Shortest Path in Binary Matrix allows eight-direction movement and counts visited cells. For rows [0,1,0] / [1,0,1] / [0,1,0], what path length is returned?
6. MinMutation is called with start=end="ACGTACGT" and an empty bank. A version that checks bank membership first returns -1. Which behavior matches the reference contract?

Select one answer.

Join Discord