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: steps1–4 select words in decreasing alphabet order; steps5–8 select numbers in increasing order. Number steps from 1 and positions from 1. Which token occupies position 8 after step 7?
- A.cabin
- B.27
- C.39
- D.pearl
- E.14
Show correct answer & explanation
Correct answer: C — 39
The successive states are step1: pearl 27 cabin 14 orange 39 blue 8; step2: pearl orange 27 cabin 14 39 blue 8; step3: pearl orange cabin 27 14 39 blue 8; step4: pearl orange cabin blue 27 14 39 8; step5: pearl orange cabin blue 8 27 14 39; step6: pearl orange cabin blue 8 14 27 39; step7: pearl orange cabin blue 8 14 27 39. Read position 8 of step7, giving 39. Selection always searches the unlocked suffix, not already locked tokens.