selection sort time complexity in all cases