Programming - Arrays - Discussion

You Are Here :: Home > C++ Language > Arrays - Discussion

 



Q.

Consider the following list.
ist = {24, 20, 10, 75, 70, 18, 60, 35}
Suppose that list is sorted using the selection sort algorithm as discussed in the book. What is the resulting list after two passes of the sorting phase, that is, after two iterations of the outer for loop?                         


A. list = {10, 18, 24, 20, 75, 70, 60, 35} B. list = {10, 18, 20, 24, 75, 70, 60, 35}
C. list = {10, 18, 24, 75, 70, 20, 60, 35} D. None of these

Answer: Option B
Explaination:

 


No Explanation




Discussion

Your Comments Goes here...
NameDiscussion