LearnFrenzy
Sign in Take a free test

Input-Output · Discussion forum

Hard Level Question 33 – answer, explanation & discussion

  • 0 comments
  • Answer explained
  • Moderated community
Question 33 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: ship owl 54 95 mango 76 16 moon
Step I: 16 ship owl 54 95 mango 76 moon
Step II: 16 54 ship owl 95 mango 76 moon
Step III: 16 54 76 ship owl 95 mango moon
Step IV: 16 54 76 95 ship owl mango moon

Following the same rule, the machine is given this input: cake fish 75 87 30 85 moon nest

Which of the following is Step II?

  • A 30 75 85 cake fish 87 moon nest
  • B 30 75 85 87 cake fish moon nest
  • C 75 30 cake fish 87 85 moon nest
  • D 30 75 cake fish 87 85 moon nest Correct
Correct Answer: Option D

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: 30 cake fish 75 87 85 moon nest; Step II: 30 75 cake fish 87 85 moon nest; Step III: 30 75 85 cake fish 87 moon nest; Step IV: 30 75 85 87 cake fish moon nest.

Answer: 30 75 cake fish 87 85 moon nest

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