4 ms·
Fails for [1, 1, 2, 3, 3, 2, 1, 1] -> [[1, 1, 2, 3, 3], [1, 2], [1, 2], [1]]
by benburk 5y ago
Fails for
[1, 1, 2, 3, 3, 2, 1, 1] -> [[1, 1, 2, 3, 3], [1, 2], [1, 2], [1]]
- alecst 5y agoThanks. I was inconsistent in my use of >= and >. Making them consistent has fixed this edge case.