Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution in Clear category for Sum Consecutives by Pouf
from itertools import groupby
from typing import List
def sum_consecutives(a: List[int]) -> List[int]:
return [sum(g) for k, g in groupby(a)]
July 28, 2020