Re:Pythonic monotonic
by mlochbaum on Friday August 13, 2021 @03:25PM
(#28173375)
That's by design (or rather, I knew it would do this and took the vague "ascending" and "descending" in the description to mean adjacent elements wouldn't be equal). Using < in d means ascending runs are strict but descending ones aren't. Probably better to use ≤ to swap these. That would match the run-splitting scheme used by Timsort.
[ Parent
| on HN ]
There are no comments on this comment yet.