GoLang Solution For LeetCode Problem: Duplicate Zeros
Solving Duplicate Zeros in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Note that elements beyond the length of the original array are not written.
Input: [1,0,2,3,0,4,5,0] Output: null Explanation: After calling your function, the input array is modified to: [1,0,0,2,3,0,0,4]
Input: [1,2,3] Output: null Explanation: After calling your function, the input array is modified to: [1,2,3]
1 <= arr.length <= 10000
0 <= arr[i] <= 9
See the full details of the problem Duplicate Zeros at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go