LearnFrenzy
Sign in Take a free test

Input-Output · Discussion forum

Hard Level Question 15 – answer, explanation & discussion

  • 0 comments
  • Answer explained
  • Moderated community
Question 15 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: ink 95 42 bell 90 83 desk goat
Step I: 95 ink 42 bell 90 83 desk goat
Step II: 95 90 ink 42 bell 83 desk goat
Step III: 95 90 83 ink 42 bell desk goat
Step IV: 95 90 83 42 ink bell desk goat

Following the same rule, the machine is given this input: owl 66 29 van wind 73 mango 96

Which of the following is Step I?

  • A 96 owl 66 29 van wind 73 mango Correct
  • B 96 73 66 owl 29 van wind mango
  • C owl 66 29 van wind 73 mango 96
  • D owl 96 66 29 van wind 73 mango
Correct Answer: Option A

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: 96 owl 66 29 van wind 73 mango; Step II: 96 73 owl 66 29 van wind mango; Step III: 96 73 66 owl 29 van wind mango; Step IV: 96 73 66 29 owl van wind mango.

Answer: 96 owl 66 29 van wind 73 mango

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