Practice30Create account

A word-and-number rearranging machine, given an input line, produces output in steps. In each step it shifts the smallest of the not-yet-arranged numbers to the left end; numbers already shifted stay at the left in ascending order and the order of the remaining items is unchanged. Example — Input: pen 52 ink 19 map 33 cup 7; Step I: 7 pen 52 ink 19 map 33 cup; Step II: 7 19 pen 52 ink map 33 cup; Step III: 7 19 33 pen 52 ink map cup; Step IV: 7 19 33 52 pen ink map cup (final). For the input 'lamp 41 tree 15 rock 28 bird 6', which element is third from the left in Step II?

Competition practiceInput-Output
  • A41
  • B15
  • Clamp
  • Dtree

Step-by-Step Solution

Step I: 6 lamp 41 tree 15 rock 28 bird. Step II: 6 15 lamp 41 tree rock 28 bird. Third from the left in Step II is 'lamp'.
Answer: C) lamp

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 rearranging machine, given an input line, produces output in steps. In…A machine rearranges an input line of words and numbers using a fixed rule, one element…A number-arranging machine rearranges an input line of numbers using one rule at each…A number-arranging machine rearranges an input line of numbers using one rule at each…A word-and-number arrangement machine, given an input line, rearranges it in steps. In…