Hot Potato Relay
Figuring out who holds the potato after k passes is a kth-successor query. Each player has picked exactly one person to pass it to.
Each player is a vertex with one outgoing arrow. If Chip passes to Maris and Maris passes to Russet, two passes from Chip end at Russet. If Maris picks Chip instead, the same two passes bring the potato right back to Chip.
The benchmark assigns new targets to randomly chosen arrows, then repeats the same queries. A cached path can be reused if its arrows stayed the same. The score counts completed rounds per second.
Ready to benchmark.
| Implementation and strategy | Rounds / second (median) |
|---|