3 ms·
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 https://news.ycombinator.com/
by 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 https://news.ycombinator.com/item?id=28170735
- eesmith 5y agoAnd for [1]; the "return sorted(arr)" needs to be "return [sorted(arr)]".