selection sort worst case space complexity