It turns out, our dishwasher has a secret passion for data structures. In its spare time, it's been learning about binary heap sorting.
As a result, the dishwasher has become so efficient that it's overflowing with perfectly sorted plates. But, alas, it can't seem to stop.
We've tried everything: from rebooting the appliance to performing an exorcism, but nothing seems to work.
Here's a snapshot of the current state of the heap:
We're considering replacing the dishwasher with a more... conventional sorting algorithm, but we're not sure where to start.
Do you have any suggestions? Maybe you could: