#102. zeroMax
zeroMax
Background
Description
Return a version of the given array where each zero value in the array is replaced by the largest odd value to the right of the zero in the array. If there is no odd value to the right of the zero, leave the zero as a zero.
Format
Input
Output
Samples
[0 5 0 3]
[5, 5, 3, 3]
[0 4 0 3]
[3, 4, 3, 3]
[0 1 0]
[1, 1, 0]
Limitation
1s, 1024KiB for each test case.