Machine-translated by Google. Questions are authored in English.
Top

Discussion

What will be step III for the following input?
Input : Uniform train 36 41 horse 81 king 61

  • A.
    36 Uniform 41 train 61 king horse 81
  • B.
    36 Uniform 41 train 61 horse 81 king
  • C.
    36 Uniform 41 train horse 81 king 61
  • D.36 Uniform 41 train 61 king 81 horse

Answer: B

Correct answer: 36 Uniform 41 train 61 horse 81 king

The placement order is 36, Uniform, 41, train, 61, king, and the machine prints a step only when something actually moves. Step I brings 36 to the front; Uniform is then already in position two, so step II brings 41 to position three; train is already in position four, so step III brings 61 to position five, giving 36 Uniform 41 train 61 horse 81 king.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.