Re:Pythonic monotonic
by benburk on Friday August 13, 2021 @12:01PM
(#28170657)
Fails for
[ Parent
| on HN ]
Thanks. I was inconsistent in my use of >= and >. Making them consistent has fixed this edge case.
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