Practice30Create account

A word-and-number arranging machine, in each step, moves the largest of the not-yet-arranged numbers to the left (building a descending block of numbers on the left), while the words keep their original relative order. Example — Input: 'book 34 cat 91 dam 27 ear 68'; Step I: 91 book 34 cat dam 27 ear 68; Step II: 91 68 book 34 cat dam 27 ear; and so on. For a new input 'sky 52 map 19 oak 74 fan 38', which element is fourth from the left end in Step II?

Competition practiceInput-Output
  • Asky
  • Boak
  • Cmap
  • D19

Step-by-Step Solution

Numbers descending are 74, 52, 38, 19. Step I: 74 sky 52 map 19 oak fan 38. Step II: 74 52 sky map 19 oak fan 38. The fourth element from the left is 'map'.
Answer: C) map

Master this topic in 30 minutes a day.

Don't just memorise the answer — build a daily practice habit.

Practice 5 Similar Questions Free →

All Input-Output practice questions

More Input-Output practice

A word-and-number arranging machine, in each step, moves the largest of the…A number-arranging machine rearranges a line of numbers step by step. In each step it…A number-arranging machine rearranges a line of numbers step by step. In each step it…A word-and-number arrangement machine rearranges an input line in steps. In each step…A word-and-number arrangement machine rearranges an input line in steps. In each step…