Directions: A word and number arrangement machine when given an input...
Observe the output given for the following input. It can be seen that the numbers are arranged according to their value in increasing order from the leftmost side and the words are arranged alphabetically in increasing order seen from the rightmost side. The numbers and words are sorted alternatively in each step such that, in the first step the number is placed at its correct position from left and in the next step the correct word is placed at the correct position from right. The arrangement continues until all the elements are arranged at correct positions.
Input- cigarette practice 432 223 641 draft 754 705 case 756 front
Step-1: 223 cigarette practice 432 641 draft 754 705 case 756 front
Step-2: 223 cigarette practice 432 641 draft 754 705 756 front case
Step-3: 223 432 cigarette practice 641 draft 754 705 756 front case
Step-4: 223 432 practice 641 draft 754 705 756 front cigarette case
Step-5: 223 432 641 practice draft 754 705 756 front cigarette case
Step-6: 223 432 641 practice 754 705 756 front draft cigarette case
Step-7: 223 432 641 705 practice 754 756 front draft cigarette case
Step-8: 223 432 641 705 754 756 practice front draft cigarette case
Step-8 is the last step of the given input.
Step-3: 223 432 cigarette practice 641 draft 754 705 756 front case
There are seven elements between 'cigarette' and 'case'.