LearnFrenzy
Sign in Take a free test

Input-Output · Discussion forum

Hard Level Question 9 – answer, explanation & discussion

  • 0 comments
  • Answer explained
  • Moderated community
Question 9 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: mango 42 54 76 night 60 fish ship
Step I: 42 mango 54 76 night 60 fish ship
Step II: 42 54 mango 76 night 60 fish ship
Step III: 42 54 60 mango 76 night fish ship
Step IV: 42 54 60 76 mango night fish ship

Following the same rule, the machine is given this input: zebra 90 umbrella rose 52 28 12 desk

In Step II, which element is 6th from the right end?

  • A zebra Correct
  • B rose
  • C umbrella
  • D 12
Correct Answer: Option A

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: 12 zebra 90 umbrella rose 52 28 desk; Step II: 12 28 zebra 90 umbrella rose 52 desk; Step III: 12 28 52 zebra 90 umbrella rose desk; Step IV: 12 28 52 90 zebra umbrella rose desk.

Answer: zebra

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