Loading rubbish...
We present BogoSort++, an enhanced version of the classic bogosort algorithm. Our key innovation is adding a progress bar, which provides users with a false sense of hope. Benchmarks show it successfully sorted a 12-element array in only 47 hours.
def bogosort_pp(arr):
import random
attempts = 0
while arr != sorted(arr):
random.shuffle(arr)
attempts += 1
print_progress_bar(attempts)
return arr
| n | Time |
|---|---|
| 5 | 0.3s |
| 8 | 12s |
| 10 | 45min |
| 12 | 47hrs |
| 15 | heat death of universe |
The progress bar.
Log in to submit a review.
No reviews yet.
The progress bar is genuinely the most important contribution in sorting algorithm research this decade.