Commenters are high as fuck.
In what city is 1.5h the average commute time, just to make sure I'll never go there.
Ah I didn't know it also exploited reversed runs. Amazing.
Why n/2? If the array is, for example, sorted in the reverse order, then there is no monotonous run at all, in which case I believe the algorithm considers each element from the array being a run in itself, giving n…
Commenters are high as fuck.
In what city is 1.5h the average commute time, just to make sure I'll never go there.
Ah I didn't know it also exploited reversed runs. Amazing.
Why n/2? If the array is, for example, sorted in the reverse order, then there is no monotonous run at all, in which case I believe the algorithm considers each element from the array being a run in itself, giving n…