CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon


Question

What will be the step III for the following input?

Input: 82 216 28 93 129 46 21 58


  1. 32 82 28 93 129 46 58 216

  2. Can’t be determined

  3. None of these

  4. 21 28 82 93 129 46 58 216

  5. 21 28 82 129 93 46 58 216


Solution

The correct option is D

21 28 82 93 129 46 58 216


Here the rule followed is:

Step I: The smallest number becomes first and the remaining numbers shift one position rightward. In case, the first number is small then the next number just larger than it will become second and the rest will shift one position rightward and so on.

Step II: The largest number among given numbers becomes last and the remaining numbers shift one position leftward. In case the largest number is first from the right end, the second largest  number replaces the second number from the right end, and so on.

These steps are repeated alternately till all the numbers get arranged in ascending order and that will be the last step for that particular input.

flag
 Suggest corrections
thumbs-up
 
0 Upvotes


Similar questions
View More


People also searched for
View More



footer-image