Each vertex belongs to one of the three sets: Unknown, Fringe, Spanning Tree.
Each edge belongs to one of the three sets: Unknown, Fringe, Spanning Tree.
The start vertex is in the Spanning tree initially.
All other vertices and edges are Unknown initially.
Clicking an edge (u,v) should cause the following:
2.1. Assume u is the recently dequeued node, while v is Unknown.
2.2. Transfer (u,v) from Unknown to Fringe.
2.3. Transfer v from Unknown to Fringe.
2.4. Enqueue (u,v).
Clicking a Dequeue button should cause the following:
6.1. Edge (u,v) is dequeued.
6.2. Transfer (u,v) from Fringe to Spanning Tree.
6.3. Transfer v from Fringe to Spanning Tree.
However, Prim-PQ and Dijkstra-PQ allow the student to make mistakes: the assumption in step 2.1 above might not be true. Refer to the program code of those exercises to how the exercise behaves with incorrect steps.
Related to generic idea in #240 : create a new version of Breadth-first Search exercise where the student simulates the queue.
This issue would extend #128. This issue requires #211 and #214.
The generic idea is the same as in DijkstraPE-scaffolded-v3:
However, Prim-PQ and Dijkstra-PQ allow the student to make mistakes: the assumption in step 2.1 above might not be true. Refer to the program code of those exercises to how the exercise behaves with incorrect steps.