LearnFrenzy
Sign in Take a free test

Input-Output · Discussion forum

Hard Level Question 11 – answer, explanation & discussion

  • 0 comments
  • Answer explained
  • Moderated community
Question 11 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: lamp 17 68 wall 92 umbrella fish 39
Step I: 92 lamp 17 68 wall umbrella fish 39
Step II: 92 68 lamp 17 wall umbrella fish 39
Step III: 92 68 39 lamp 17 wall umbrella fish
Step IV: 92 68 39 17 lamp wall umbrella fish

Following the same rule, the machine is given this input: desk eagle 32 ship 36 68 67 fish

What is the final arrangement (the last step)?

  • A 68 67 36 desk eagle 32 ship fish
  • B 68 67 36 32 desk eagle ship fish Correct
  • C 67 36 32 desk eagle ship fish 68
  • D fish ship eagle desk 32 36 67 68
Correct Answer: Option B

Rule (from the illustration): In each step the largest 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: 68 desk eagle 32 ship 36 67 fish; Step II: 68 67 desk eagle 32 ship 36 fish; Step III: 68 67 36 desk eagle 32 ship fish; Step IV: 68 67 36 32 desk eagle ship fish.

Answer: 68 67 36 32 desk eagle ship fish

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