Move Zeros Back
Start Timer
0:00:00
Given an array of integers, write a function move_zeros_back that moves all zeros in the array to the end of the array. If there are no zeros, return the input array.
Example:
Input:
array = [0,5,4,2,0,3]
def move_zeros_back(array) -> [5,4,2,3,0,0]
.
.
.
.
.
.
.
.
.
Comments