Problem 613 · Easy

Shortest Distance in a Line

Find the smallest gap between two different positions on a number line. The visual sorts the positions and compares each neighbouring pair.

Open the interactive visualisation