All Questions
Tagged with sorting co.combinatorics
1 question
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 $...