Topological Sort

Problem: Make objects A through K yellow. The order in which objects become yellow is a topological sort.

Update: Click the "Update" button to start and anytime the applet needs to be redrawn.

Current: There is always a "current" object. Initially it is "A". The current object is shown in the middle box labeled "current:".

Stack: A container of objects. An object may added to the stack using the button "Current to Stack". Only the current object can be added to the stack. An object may be removed from the stack and made the current object using the "Stack to Current" button. This is the only way the current object can be changed.

Visit: An object may be visited from the current object by pressing one of the letter buttons (the letter of the object to be visited). If there is no line between the current object and the object to be visited, nothing happens. An object that is visited from the current object becomes the current object.

Visible objects: Only objects that are neighbors of the current object are shown.