Sobes.tech
Junior — Senior

Moving all zero elements to the end of the sequence

livecode

Task condition

Given an array consisting of non-negative integers. The task is to move all elements equal to zero to the end of the array, while maintaining the order of the other elements. Example: 0 1 0 2 0 3 => 1 2 3 0 0 0