Directions: A word and number arrangement machine when given an input...
Observe the output to the given input. It can be seen that, the numbers are arranged in the increasing order of their values and the words are arranged in increasing alphabetical order. The elements are placed at alternate positions starting from the left. The sorting continues till all the elements are arranged as required.
Input- 767 56 end 601 88 522 operation action error entertainment
Step-1: 56 767 end 601 88 522 operation action error entertainment
Step-2: 56 action 767 end 601 88 522 operation error entertainment
Step-3: 56 action 88 767 end 601 522 operation error entertainment
Step-4: 56 action 88 end 767 601 522 operation error entertainment
Step-5: 56 action 88 end 522 767 601 operation error entertainment
Step-6: 56 action 88 end 522 entertainment 767 601 operation error
Step-7: 56 action 88 end 522 entertainment 601 767 operation error
Step-8: 56 action 88 end 522 entertainment 601 error 767 operation
Step-8 is the last step of the given input.
Step-2: 56 action 767 end 601 88 522 operation error entertainment