Skip to main content

All Questions

Filter by
Sorted by
Tagged with
21 votes
1 answer
1k views

Bubblesort with a twist: a tricky termination

Consider an $n$-tuple $\left(a_1, a_2, \ldots, a_n\right)$ of real numbers. We are allowed to perform the following two moves: S-moves: We pick two adjacent entries $a_i$ and $a_{i+1}$ satisfying $...
darij grinberg's user avatar