0 votes 0 votes Which of the following input will give best case time for selection sort? (A) 1 2 3 4 5 6 7 8 9 10 (B) 2 3 1 5 9 7 8 6 10 (C) 10 9 8 7 6 5 4 3 2 1 (D) All of above take same amount of time Algorithms made-easy-test-series algorithms sorting + – Rajat Agrawal007 asked Dec 17, 2018 • edited Mar 3, 2019 by akash.dinkar12 Rajat Agrawal007 4.6k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply aambazinga commented Dec 17, 2018 reply Follow Share D? as all the best, worst and average case time complexity of selection is O(n^2). 0 votes 0 votes Rajat Agrawal007 commented Dec 17, 2018 reply Follow Share But in the option B , there are only 9 elements where as both A and C has 10 elements. 1 votes 1 votes DAWID15 commented Dec 21, 2021 reply Follow Share Selection sort has time complexity of O(n^2) for both best and worst case. So answer is D. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Option D) All take same time as Complexity of Selection sort in every case is O(n^2) Sanandan answered Sep 9, 2020 Sanandan comment Share Follow See all 0 reply Please log in or register to add a comment.