Problem 1129 · Medium

Shortest Path with Alternating Colors

Search over (node, colour of the edge used to arrive) states so that red and blue edges alternate along the path.

Open the interactive visualisation