Re:Pythonic monotonic
by alecst on Friday August 13, 2021 @12:24PM
(#28170981)
Thanks. I was inconsistent in my use of >= and >. Making them consistent has fixed this edge case.
[ Parent
| on HN ]
Also fails for
[3, 3, 2, 2, 1, 1] -> [[3, 3], [2, 2], [1, 1]]
Here's my solution https://news.ycombinator.com/item?id=28170735