Question

Write a function that moves all four to the end of the array while maintaining the order of other elements?

Login to Submit

Examples

Example 1
input: [3, 4, 2, 4, 5, 3]
output: [3, 2, 5, 3, 4, 4]

Example 2
input: [4, 1, 4, 4, 2, 3]
output: [1, 2, 3, 4, 4, 4]