LearnFrenzy
Sign in Take a free test

Input-Output · Discussion forum

Hard Level Question 10 – answer, explanation & discussion

  • 0 comments
  • Answer explained
  • Moderated community
Question 10 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: sun 54 year goat 47 26 vest 10
Step I: sun 54 year 47 26 vest 10 goat
Step II: 54 year 47 26 vest 10 sun goat
Step III: 54 year 47 26 10 vest sun goat
Step IV: 54 47 26 10 year vest sun goat

Following the same rule, the machine is given this input: 20 53 year sun 61 toy nest 27

In Step II, which element is 7th from the left end?

  • A 20
  • B nest
  • C 53
  • D sun Correct
Correct Answer: Option D

Rule (from the illustration): In each step the word that comes first in the dictionary, of those not yet arranged, moves to the right end, before the words already arranged; numbers keep their order.

For the new input: Step I: 20 53 year sun 61 toy 27 nest; Step II: 20 53 year 61 toy 27 sun nest; Step III: 20 53 year 61 27 toy sun nest; Step IV: 20 53 61 27 year toy sun nest.

Answer: sun

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