Question
If the following is the sixth step of an input, what
will be the second step? Step VI: 21, 35, 48, 92, 79, 89, 52, 62, 103, 115 Directions : Study the following information carefully to answer the questions given below:A number sorting machine, when given an input of numbers, rearranges the numbers in a particular manner step by step as indicated below, till all the numbers are arranged in a particular order. Given below is an illustration of this arrangement. Input: 45, 163, 53, 19, 81, 139, 18, 48, 73, 96 Step I: 18, 45, 163, 53, 19, 81, 139, 48, 73, 96 Step II: 18, 45, 53, 19, 81, 139, 48, 73, 96, 163 Step III: 18, 19, 45, 53, 81, 139, 48, 73, 96, 163 Step IV: 18, 19, 45, 53, 81, 48, 73, 96, 139, 163 Step V: 18, 19, 45, 48, 53, 81, 73, 96, 139, 163 Step VI: 18, 19, 45, 48, 53, 73, 81, 96, 139, 163 (This is the final arrangement and VI is the last step for this input.)Solution
The following is the logic: Input to step I: The smallest no. comes to the leftmost position and the rest shift rightward. Step I to Step II: The largest no. comes to the rightmost position and the rest shift leftward. And thus we go on arranging the nos. on left and right alternately till the final arrangement is in ascending order. We can’t proceed backwards.
Which organization will be responsible for the Medium Refit with Life Certification (MRLC) of Sub-Surface Killer (SSK) Class of Submarine "INS Shankush"?
Which article of the Indian Constitution specifies the term of office for a Governor?
As per the latest FIFA rankings, what position does India hold in the men’s rankings, and which country is at the top?
How many Amrit Bharat stations are planned to be redeveloped by 2027 under the scheme?
Who will lead India's implementation of the BBNJ Agreement?
Under the Gruha Lakshmi scheme, women heads of households across the state would receive ₹2,000 every month. This scheme would benefit as many as 12.8...
In bacteria, which of the following mechanisms primarily contributes to genetic variation?
Recently who won the best director award at New York Film Critics Circle?
President Droupadi Murmu received an Honorary Doctorate in Political Science from which university during her visit to Algeria?
How many 'Clean Plant' projects are planned to be launched across India, as announced during the Agri Hackathon in Pune?