Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
alecst
· 5y ago · 0 comments
Thanks. I was inconsistent in my use of >= and >. Making them consistent has fixed this edge case.
Comments
[–]
benburk
5y ago
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
[–]
eesmith
5y ago
And for [1]; the "return sorted(arr)" needs to be "return [sorted(arr)]".