Sort 5 Elements in 7 Steps
*A smart and interesting sorting. Suppose I have five elements: a, b, c, d, e. And I want to sort them in 7 steps: Step 1: 3 comparisons: if a > b: swap(a, b); if c > d: swap(c, d); if b > d: swap(b, d), swap(a, c) ![Imgur](https://i.imgur.com/qzLVYmQ.png =200x200) Step 2: 2 comparisons: now I need to find the position for e in {a, b, d}: if (e < b) if (e < a) e a b d else a e b d else if (e < d) a b e d else a b d e !...