Practice30Create account

An arrangement machine works on an input line of words and numbers in steps, using only the positions of the elements. In Step 1 it interchanges the elements standing 1st and 2nd, in Step 2 those standing 3rd and 4th, in Step 3 those standing 5th and 6th, and so on, each step taking the next untouched pair from the left. The machine stops when fewer than two untouched elements are left.
Input: 52 agra 37 patna 19 surat 46 thane.
Which of the following is Step 3 of the above arrangement?

Competition practiceInput-Output
  • Aagra 52 patna 37 surat 19 46 thane
  • Bagra 52 patna 37 19 surat 46 thane
  • Cagra 52 patna 37 surat 19 thane 46
  • D52 agra 37 patna surat 19 46 thane

Step-by-Step Solution

Step 1 interchanges 52 and agra: agra 52 37 patna 19 surat 46 thane. Step 2 interchanges the 3rd and 4th elements, 37 and patna: agra 52 patna 37 19 surat 46 thane. Step 3 interchanges the 5th and 6th, 19 and surat: agra 52 patna 37 surat 19 46 thane, the answer. "agra 52 patna 37 19 surat 46 thane" is Step 2 and "agra 52 patna 37 surat 19 thane 46" is Step 4, the two off-by-one errors. "52 agra 37 patna surat 19 46 thane" takes the pairs from the right-hand end of the line instead of the left.
Answer: A) agra 52 patna 37 surat 19 46 thane

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, using only…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 works on an input line of words and numbers in steps. The numbers…An arrangement machine works on an input line of words and numbers in steps. The numbers…