Directions: A machine rearranges a given input line step-by-step as pe...
The logic used here is explained below
For words: Words are arranged alphabetically from left to right according to English dictionary by looking at the first letter of each word. So, the first letter which comes first alphabetically among all the words is picked and written at the left end of the row. Then, the next letter is written after it. The words are put together one after another. All the words are placed at the left end of the row.
For numbers: Numbers are arranged in descending order. The largest number is picked first and after that the second largest number and so on. Numbers are arranged in such a way that they are put together with other numbers. All the numbers are arranged at the right end of the row.
The complete rearrangement is as follows.
Input: kites 30 optimistic 5 glacier watch 40 25 umbrella 20 rest 10 15 nature 35 desk
Step 1: desk 40 kites 30 optimistic 5 glacier watch 25 umbrella 20 rest 10 15 nature 35
Step 2: desk glacier 40 35 kites 30 optimistic 5 watch 25 umbrella 20 rest 10 15 nature
Step 3: desk glacier kites 40 35 30 optimistic 5 watch 25 umbrella 20 rest 10 15 nature
Step 4: desk glacier kites nature 40 35 30 25 optimistic 5 watch umbrella 20 rest 10 15
Step 5: desk glacier kites nature optimistic 40 35 30 25 20 5 watch umbrella rest 10 15
Step 6: desk glacier kites nature optimistic rest 40 35 30 25 20 15 5 watch umbrella 10
Step 7: desk glacier kites nature optimistic rest umbrella 40 35 30 25 20 15 10 5 watch
Step 8: desk glacier kites nature optimistic rest umbrella watch 40 35 30 25 20 15 10 5
From the above pattern, we see that option (1) is correct.