How many steps will be required to complete the rearrangement for the given input?
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