Question
What will be the last step for the following input?
Input: 172, 77, 49, 91, 90, 160, 41, 83 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. The last step will be the one arranged fully in ascending order.
Find the difference between angle and its complement if the angle is three-seventh of its complement.
A triangular field has sides 13 m, 14 m, and 15 m. A well with a diameter of 7 m is dug outside the field. If the entire soil dug from the well is used ...
If O is circumcentre of acute angled triangle ABC, if ∠ OBC = 150 then ∠BAC = ?
Find the area of triangle having sides in the ratio 3:5:7 & the perimeter of the triangle is 60 cm
If I is the incentre of ΔABC , if ∠BAC = 300 , then what is the measure of ∠BIC?
At the centre of a circle of 20 cm radius, the angle made by an arc of 24(4/9) cm length is
Orthocenter of an right angle triangle lies on
Angles of a triangle are in the ratio 3 : 5 : 10. Find the sum of the smallest and middle angle of the triangle.
The diagonals of a rectangle are inclined to one side of the rectangle at 25°. The acute angle formed between the diagonals is: