0 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 5.1k views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply aambazinga commented Dec 17, 2018 reply Follow flag D? as all the best, worst and average case time complexity of selection is O(n^2). 0 0 replyShare Rajat Agrawal007 commented Dec 17, 2018 reply Follow flag But in the option B , there are only 9 elements where as both A and C has 10 elements. 1 1 replyShare DAWID15 commented Dec 21, 2021 reply Follow flag Selection sort has time complexity of O(n^2) for both best and worst case. So answer is D. 0 0 replyShare Please log in or register to add a comment.
0 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 0 reply Please log in or register to add a comment.