CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

How many steps will be required to complete the rearrangement for the given input?


A

Five

No worries! We‘ve got your back. Try BYJU‘S free classes today!
B

Seven

Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C

Eight

No worries! We‘ve got your back. Try BYJU‘S free classes today!
D

Nine

No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B

Seven


From Input to Step I. The word that comes first in alphabetical order goes to the first position. The smallest number goes to the second position. The rest of the line shifts rightward.

From Step I to Step II. The word that comes second in alphabetical order goes to the first position. The second smallest number goes to the second position. The rest of the line shifts rightward.

This goes on until in the last step all the words are arranged in reverse alphabetical order and the numbers are arranged in descending order from left to right

Input: 32 proud girl beautiful 48 55 97 rich family 61 72 nice life

Step I: beautiful 17 32 proud girl 48 55 97 rich family 61 72 nice life

Step II: family 32 beautiful 17 proud girl 48 55 97 rich 61 72 nice life

Step III: girl 48 family 32 beautiful 17 proud 55 97 rich 61 72 nice life

Step IV: life 55 girl 48 family 32 beautiful 17 proud 97 rich 61 72 nice

Step V: nice 61 life 55 girl 48 family 32 beautiful 17 proud 97 rich 72

Step VI: proud 72 nice 61 life 55 girl 48 family 32 beautiful 17 97 rich

Step VII: rich 97 proud 72 nice 61 life 55 girl 48 family 32 beautiful 17


flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Arithmetic Progression
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon