Practice30Create account

A word-and-number arrangement machine, when given an input line of words and numbers, rearranges it in steps. The smallest number of the line never moves; instead, in each step, whichever element happens to stand immediately to the left of that smallest number is taken out and placed at the extreme left end of the line. Every other element keeps its relative position, and the step is then repeated on the new line.
Input: mandir 57 ghat 39 chaupal 24 lamp 68.
Which of the following is Step 3 of the above arrangement?

Competition practiceInput-Output
  • Aghat 39 chaupal mandir 57 24 lamp 68
  • B39 chaupal mandir 57 ghat 24 lamp 68
  • C57 ghat 39 chaupal mandir 24 lamp 68
  • Dchaupal 24 lamp mandir 57 ghat 39 68

Step-by-Step Solution

The smallest number is 24 and it never moves. Step 1 takes chaupal, which stands just to its left: chaupal mandir 57 ghat 39 24 lamp 68. Step 2 takes 39, now just to the left of 24: 39 chaupal mandir 57 ghat 24 lamp 68. Step 3 takes ghat: ghat 39 chaupal mandir 57 24 lamp 68, the answer. "39 chaupal mandir 57 ghat 24 lamp 68" is Step 2 and "57 ghat 39 chaupal mandir 24 lamp 68" is Step 4, the off-by-one steps. "chaupal 24 lamp mandir 57 ghat 39 68" works from the largest number, 68, instead of the smallest.
Answer: A) ghat 39 chaupal mandir 57 24 lamp 68

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 arrangement machine, when given an input line of words and numbers,…A word-and-number arrangement machine, when given an input line of words and numbers,…A word-and-number arrangement machine, when given an input line of words and numbers,…A word-and-number arrangement machine, when given an input line of words and numbers,…A word-and-number arrangement machine, when given an input line of words and numbers,…