Sobes.tech
Intern — Middle

Move all zero elements to the end of the list

livecode

Task condition

Given a list of integers. Move each element equal to zero to the end of the list, while maintaining the order of all other elements.

Input: [1, 0, 8, 9]

Output: [1, 8, 9, 0]