Draft (inspired by a builtin I just added to my Jelly fork): Given a list (even length) of integers, split into consecutive pairs, sort each pair by its sum, then flatten. e.g. [2,3,6,4,2,1] -> [[2,3],[6,4],[2,1]] -> [[2,1],[2,3],[6,4]] -> [2,1,2,3,6,4]
@Bubbler I'm sure this is a challenge on main, that might have a better wording
It's something like "count occurrences in each prefix"
@DLosc Great question! I didn't intend for that to ever happen, so no. You'll only receive valid input where valid means no consecutive zeroes. But you're of course welcome to also submit a clever solution which takes care of that edge case.
If it does take care of that case, I'd say the two reasonable outcomes are that both zeroes are incremented, or neither are. I suppose that's sort of obvious, though.