LearnFrenzy
Sign in Take a free test

Input-Output · Discussion forum

Easy Level Question 25 – answer, explanation & discussion

  • 0 comments
  • Answer explained
  • Moderated community
Question 25 Back to Exercise

A word and number arrangement machine rearranges an input line step by step, following a rule. Here is an illustration of the input and the steps:

Input: kite mango vest 89 48 81
Step I: 48 kite mango vest 89 81
Step II: 48 81 kite mango vest 89
Step III: 48 81 89 kite mango vest

Following the same rule, the machine is given this input: rose 92 pot 70 52 van

Which step is the last step for this input?

  • A Step II
  • B Step V
  • C Step III Correct
  • D Step IV
Correct Answer: Option C

Rule (from the illustration): In each step the smallest number not yet arranged moves to the left end, after the numbers already arranged; the words keep their order.

For the new input: Step I: 52 rose 92 pot 70 van; Step II: 52 70 rose 92 pot van; Step III: 52 70 92 rose pot van.

Answer: Step III

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links