QUESTION 1 OF 25
Input: pearl 27 cabin 14 orange 39 blue 8. At each step the selected token is removed from the unlocked suffix and appended to the locked prefix; previously locked tokens remain in order, and all unselected suffix tokens retain relative order. Selection rule: odd steps select the smallest unlocked number; even steps select the alphabetically earliest unlocked word. Number steps from 1 and positions from 1. Which token occupies position 1 after step 2?
- A.pearl
- B.14
- C.8
- D.cabin
- E.27
Show correct answer & explanation
Correct answer: C — 8
The successive states are step1: 8 pearl 27 cabin 14 orange 39 blue; step2: 8 blue pearl 27 cabin 14 orange 39. Read position 1 of step2, giving 8. Selection always searches the unlocked suffix, not already locked tokens.