Question
Which sorting algorithm is not stable by
default?Solution
QuickSort doesn’t guarantee order of equal elements unless modified; others (except selection sort) can be stable.
24, 168, 28, 140, 35, ?
5, 23, 18, 36, 31, ?
16 25 36 49 64 ?
32 33 29 38 ? 47 11
...15, 90, 95, ?, 383, 766
23 44 64 83 ? 118
...80, ?, 240, 80, 20, 4
Which of the following number will replace the question mark (?) and complete the given number series?
4, 5, 12, 39, 160, ?
23 40 67 104 ? 208
...32, 42, 62, 92, ?, 182