1 class Solution: 2 def duplicateZeros(self, arr: List[int]) -> None: 3 """ 4 Do not return anything, modify arr in-place instead. 5 """ 6 n = len(arr) 7 if n > 0: 8 i = 0 9 while i < n - 1:10 if arr[i] == 0:11 for j in range(n-2,i,-1):12 arr[j+1] = arr[j]13 arr[i+1] = 014 i += 215 else:16 i += 1