Question LR-IO-0065
HardA word-arrangement machine rearranges a line of words step by step. In each step it takes the word that comes last in dictionary order among the words not yet arranged and moves it to the right end of the unarranged part (just before the words already arranged).
Input: Pune Agra Surat Kochi Patna Indore Nagpur
What is the final arrangement?
- A.
Agra Indore Kochi Nagpur Patna Pune Surat
- B.
Agra Kochi Indore Nagpur Patna Pune Surat
- C.
Sign up free to see the answer and a step-by-step explanation.