QUESTION 1 OF 25
Original sequence: 17, 4, 22, 9, 28, 12, 31, 6. Process A: sort increasingly, then swap every adjacent pair. Process B: reverse, then swap every adjacent pair. Each process starts separately from the original sequence; numbering restarts at 1 after each ordering operation. What is A's entry minus B's entry at position 6?
- A.9
- B.12
- C.10
- D.8
- E.11
Show correct answer & explanation
Correct answer: D — 8
A gives 6, 4, 12, 9, 22, 17, 31, 28; B gives 31, 6, 28, 12, 22, 9, 17, 4. At position 6, subtract 9 from 17, obtaining 8. Sorting and reversal do not generally commute with position-dependent operations.