Loading page…
A parcel app must check a belt map: does it hold a cycle, can the hubs get two colours, is it a tree. One walk with a seen mark, skipping the arrival belt, finds a cycle in two-way belts. A queue colours the hubs, and an odd cycle is the clash. One-way belts need three marks, because only a hub on the path closes a cycle. Topological sort and union-find are the better tools in two cases.
You work on a parcel app.