Second Round : Second Round In the second round 2nd element is compared with 3rd, 4th and then with 5th elements . Elements are interchanged or swaped whenever require . Sorting process is shown below :
25 , 3 , 5 , 15 , 20 [2nd is compared with 3rd]
interchange 3 and 5
Status of the array : 25, 5, 3, 15, 20
25 , 5 , 3 , 15 , 20 [2nd is compared with 4th]
interchange 5 and 15
Status of the array : 25, 15, 3, 5, 20
25 , 15 , 3 , 5 , 20 [2nd is compared with 5th]
interchange 15 and 20
Array Status : 25 , 20 , 3 , 5 , 15 [2nd largest has come to
the second place]
After the second round the second largest element has
come to the second position.