1 votes 1 votes What could be the best algorithm from the following when the time complexity is measured based bon the number of swaps performed by the sorting algorithm? 1. Selection sort 2. Insertion sort 3. Bubble sort 4. None of these Algorithms time-complexity sorting + – kallu singh asked Aug 19, 2017 • retagged Jun 22, 2022 by makhdoom ghaya kallu singh 244 views answer comment Share Follow See 1 comment See all 1 1 comment reply rahul sharma 5 commented Aug 19, 2017 reply Follow Share 1. Selection sort. It does n swaps for n elements to sort where as insertion and bubble can do upto o(n^2) 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes selection sort max n-1 swap insertion sort max n(n-1)/2 swap bubble sort max n*(n-1)/2 swap sachin! answered Aug 19, 2017 sachin! comment Share Follow See all 0 reply Please log in or register to add a comment.