Input: zeal fan 52 31 heal 22 track 12
Which of the following will be the IIIrd step?
fan 52 heal zeal 31 22 track 12
From the last step it is clear that words are arranged in alphabetical order and nos. are arranged in decreasing order alternately. To obtain this output first the word, which comes first in dictionary, comes to the first place and the rest shift one place rightwards. In the next step the largest no. comes to the second place and the rest shift one place rightwards. These two steps occur alternately until the last step is obtained.