1) bi-directional bubble sort: alternate going thru list from both ends until no swaps needed (a flag)
2) optimized selection sort: need to find the min and max values so linear time to find both these values, then we put them in their final places, is this right?
Sounds right to me.
With your [2,3,4,5,1] example, you could define a special case where the number of indices involved is 3. Keep track of the 3 values, then place the min at the beginning, the max at the end, and the remaining value into the middle index, resulting in [1,3,4,2,5]. The min/max search space then decreases by 2 and repeats.
There might be a better way to implement the selection sort variant.