Bead sort | Karthik Karanth

1 min read Original article ↗
Karthik Karanth

Blog Art Projects

PUBLISHED ON OCT 1, 2020

<div style="display: flex; justify-content: flex-end;">
    <button class="btn btn-primary" style="" id="reset-btn">Reset</button>
</div>

Bead sort1 is a sorting algorithm powered by gravity!

  • For each number x in the array we want to sort, we arrange x beads in a row.
  • Let them all drop.
  • Count the number of beads in each row from top to bottom, and we have our sorted array!

  1. Bead sort - Wikipedia ↩︎