You can extract min and max in a single iteration with a dedicated function.
Yeah! Just bubblesort the data and pick off the values at either end of the array…
You can do it in linear time, though.
thanks to quantum bogo sort i can do it in constant time!~
Doesn't quantum bogo sort still take linear time because you have to look at the whole array before you decide whether to destroy the entire universe?