Practice30Create account

An arrangement machine works on an input line of words and numbers in steps. The numbers never move at all: they stay in the very places they occupy in the input. In each step every word moves one place to the right along the places held by words, and the word standing in the last of those places comes round to the first of them. The machine stops as soon as the line reads exactly as the input line did.
Input: scarf 48 shirt 92 jacket 37 tabla.
Which of the following is Step 2 of the above arrangement?

Competition practiceInput-Output
  • Ajacket 48 tabla 92 scarf 37 shirt
  • Btabla 48 scarf 92 shirt 37 jacket
  • Cshirt 48 jacket 92 tabla 37 scarf
  • D37 tabla scarf 48 shirt 92 jacket

Step-by-Step Solution

The words occupy the 1st, 3rd, 5th and 7th places and read scarf, shirt, jacket, tabla. Each step slides them one place to the right along those four places, the last coming round to the first. Step 1 gives tabla, scarf, shirt, jacket: tabla 48 scarf 92 shirt 37 jacket. Step 2 gives jacket, tabla, scarf, shirt: jacket 48 tabla 92 scarf 37 shirt, the answer. "tabla 48 scarf 92 shirt 37 jacket" is Step 1 and "shirt 48 jacket 92 tabla 37 scarf" is Step 3. "37 tabla scarf 48 shirt 92 jacket" slides every element of the line two places, forgetting that the numbers never move.
Answer: A) jacket 48 tabla 92 scarf 37 shirt

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

An arrangement machine works on an input line of words and numbers in steps. The 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,…An arrangement machine reorders an input line of words and numbers one step at a time.…