CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon


Question

Input: zeal fan 52 31 heal 22 track 12

Which of the following will be the IIIrd step?


  1. fan 52 heal 31 zeal 22 track 12

  2. fan 52 heal 31 track zeal 22 12

  3. None of these

  4. fan 52 heal zeal 31 22 track 12


Solution

The correct option is D

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.

flag
 Suggest corrections
thumbs-up
 
0 Upvotes


Similar questions
View More


People also searched for
View More



footer-image