Problem 573 · Medium

Squirrel Simulation

Find the minimum total distance for a squirrel to carry every nut to a tree, one nut at a time. The visual compares the extra cost of the squirrel's first trip for each nut and picks the nut with the largest saving.

Open the interactive visualisation