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

后端 未结 0 1413
傲寒
傲寒 2020-12-10 11:50

If there is no odd value to the right of the zero, leave the zero as a zero.
zeroMax([0, 5, 0, 3]) → [5, 5, 3, 3] zeroMax([0, 4, 0, 3]) → [3, 4, 3, 3]

This is f

相关标签:
回答
  • 消灭零回复
提交回复
热议问题