This is my second hybrid sorting algorithm, between Selection Sort and Insertion Sort. Basic explanation of this sorting algorithm: 1. Select an element such that this element is greater than or equal to the next element. 2. Cycle through the remaining elements to the end of the list and select all elements less than or equal to the previously selected element. 3. Insert these elements at its correct order, while maintaining the selected positions. 4. If all the elements are sorted, stop. Else, go back to Step 1.
Adaptability: If the array is backwards sorted, this sorting algorithm will reverse the order of the elements. Also if part of the array is forwards sorted, it will skip that part. Time Complexity: Not tested, but worst-case and average-case time complexity is believed to be n^2(since Insertion and Selection Sort have the same time complexity). Stability: Untested. Assume unstable. (since Selection Sort is unstable). Space complexity: n