Study the information carefully and answer the question below. A number sorting machine when an input numbers, rearranges the numbers in a particular manner step by step. The following is an illustration of input.
And so on till all the numbers get arranged in ascending order. How many steps will be required for getting the final output for the following input? Input ‘101, 85, 66, 49, 73, 39, 142, 25, 115, 74’ |
|||||||||||||
(a) |
5 |
(b) |
6 |
||||||||||
(c) |
7 |
(d) |
8 |
Study the information carefully and answer the question below. A number sorting machine when an input numbers, rearranges the numbers in a particular manner step by step. The following is an illustration of input.
And so on till all the numbers get arranged in ascending order. How many steps will be required for getting the final output for the following input? Input ‘101, 85, 66, 49, 73, 39, 142, 25, 115, 74’ |
|||||||||||||
(a) |
5 |
(b) |
6 |
||||||||||
(c) |
7 |
(d) |
8 |
Step I - the smallest number comes at the first from left and remaining lines towards right
Step II - the 2nd smallest number comes at the second position from left and remaining lines towards right
Step III - the 3rd smallest number comes at the 3rd position from left and remaining lines towards right. Further steps will be obtained in the same manner till all the words get arranged in ascending order.
By applying above rules for given input, we get, final output - step VIII
Required steps = 8.