Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Duplicate Zeros by wo.tomasz
from typing import Iterable
def duplicate_zeros(donuts: list[int]) -> Iterable[int]:
dn = []
for n in donuts:
dn.append(n)
if n == 0:
dn.append(n)
return dn
Dec. 26, 2022