Ready to sort

Statistics

Status Idle
Operations 0 / 0

Controls

50
5x

Summary

The hardest choices require the strongest wills. This algorithm faces the reality of a disordered array and enacts a radical solution. It is not about rearranging elements, but about achieving a state of perfect balance through reduction. The process is random, dispassionate, and fair to all elements, regardless of their value. When it's done, half the data will still exist. A small price to pay for salvation.

How it Works

  • Scan the array to check if it is currently sorted.

  • If the array is sorted, the work is done.

  • If disorder is found... Snap.

  • The Snap selects half of the current elements at random.

  • Delete the selected elements from the array instantly.

  • Repeat this process until balance is achieved, or the array is reduced to a single, trivial element.