LearnFrenzy
Sign in Take a free test

Input-Output · Discussion forum

Easy Level Question 17 – answer, explanation & discussion

  • 0 comments
  • Answer explained
  • Moderated community
Question 17 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: lion 18 33 wall yarn 87
Step I: 18 lion 33 wall yarn 87
Step II: 18 33 lion wall yarn 87
Step III: 18 33 87 lion wall yarn

Following the same rule, the machine is given this input: umbrella 34 42 house fish 71

What is the final arrangement (the last step)?

  • A umbrella 34 42 house fish 71
  • B 34 42 71 umbrella house fish Correct
  • C fish house umbrella 71 42 34
  • D 42 71 umbrella house fish 34
Correct Answer: Option B

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: 34 umbrella 42 house fish 71; Step II: 34 42 umbrella house fish 71; Step III: 34 42 71 umbrella house fish.

Answer: 34 42 71 umbrella house 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