Study the following information to answer the given questions:
A word and number arrangement machine when given an input line of words and numbers rearranges them following a particular rule in each step. The following is an illustration of input and rearrangement.(All the numbers are two-digit numbers and are arranged as per some logic based on the value of the numbers.)
Input:win 56 32 93 bat for 46 him 28 11 give chance
Step I:93 56 32 bat for 46 him 28 11 give chance win
StepII:11 93 56 32 bat for 46 28 give chance win him
Step III:56 11 93 32 bat for 46 28 chance win him give
Step IV:28 56 11 93 32 bat win him give for chance bat
Step V:46 28 56 11 93 32 bat win him give for chance
Step VI:32 46 28 56 11 93 win him give for chance bat
Step VI is the last step of the arrangement the above input.
Input for the question:
Input:fun 89 at the 28 16 base camp 35 53 here 68
(All the number given in the arrangement are two digit numbers.)
Data provided to us is:
Input:win 56 32 93 bat for 46 him 28 11 give chance
Step I:93 56 32 bat for 46 him 28 11 give chance win
StepII:11 93 56 32 bat for 46 28 give chance win him
Step III:56 11 93 32 bat for 46 28 chance win him give
Step IV:28 56 11 93 32 bat win him give for chance bat
Step V:46 28 56 11 93 32 bat win him give for chance
Step VI:32 46 28 56 11 93 win him give for chance bat
Step VI is the last step of the arrangement the above input.
By analysing the data we get,
The numbers are shifted in such a manner that alternately highest and lowest number are shifted leftwards.
The words are shifted leftwards such that they are moved in descending order in alphabetical series.
Hence for us input is,
Input:fun 89 at the 28 16 base camp 35 53 here 68
Step I: 16 fun 89 at 28 base camp 35 53 here 68 the
Step II: 89 16 fun at 28 base camp 35 53 68 the here
Step III: 28 89 16 at base camp 35 53 68 the here from
Step IV: 68 28 89 16 at base 35 53 the here fun camp
Step V: 35 68 28 89 16 at 53 the here fun camp base
Step VI: 53 35 68 28 89 16 the here fun camp base at
35 is at seventh position in step IV.
Create a FREE account and get: