I'm a bit confused with the performance guarantee and complexity of selection sort. I checked through internet and the complexity of selection sort is O(n^2). This O(n^2) is in terms of time complexity, am i right?So how about performance guarantee? Is the performance guarantee in my case measured in terms of swapping or in time complexity as well? If the performance guarantee is in terms of swapping, so best case of swapping is zero swaps (the array is already sorted) and the worst case of swapping is n-1 step? The performance guarantee is then equal to (n-1)/0=undefined, am I correct? Please correct me if im wrong...or is the performance guarantee is in terms of running time? Then performance guarantee will be (n-1)/(n-1) = 1?Can someone please clear my doubts?
Difference between complexity and performance guarantee
algorithms;complexity