Practice30Create account

An arrangement machine works on an input line having an odd number of elements. In each step it takes the single element standing exactly in the middle of the line — with as many elements to its left as to its right — and places it at the extreme left end. Every other element keeps its relative position, and the step is then repeated on the new line.
Input: 52 chaupal 37 mandir 46.
Which of the following is Step 2 of the above arrangement?

Competition practiceInput-Output
  • A37 52 chaupal mandir 46
  • B52 chaupal 37 mandir 46
  • Cchaupal 37 52 mandir 46
  • Dmandir 37 52 chaupal 46

Step-by-Step Solution

The line has five elements, so the middle one is the third. Step 1 moves 37 to the extreme left: 37 52 chaupal mandir 46. In that new line the middle element is chaupal, so Step 2 moves chaupal to the extreme left: chaupal 37 52 mandir 46, the answer. "37 52 chaupal mandir 46" is Step 1. "52 chaupal 37 mandir 46" is the input line, which the machine reaches again only at Step 3. "mandir 37 52 chaupal 46" takes the middle element of the input line a second time instead of the middle of the line produced by Step 1.
Answer: C) chaupal 37 52 mandir 46

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 two-digit…An arrangement machine reorders an input line of words and numbers one step at a time.…An arrangement machine reorders an input line of words and numbers one step at a time.…An arrangement machine works on an input line of words and numbers in steps. In each…A word-and-number arrangement machine, when given an input line of words and numbers,…