Write an algorithm that takes an array and moves all of the zeros to the end, preserving the order of the other elements.
moveZeros([false,1,0,1,2,0,1,3,"a"]) // returns[false,1,1,2,1,3,"a",0,0]
'매일매일개발 > Codewars' 카테고리의 다른 글
codewars #74 CamelCase to underscore(6kyu) (0) | 2018.07.06 |
---|---|
codewars #73 Counting Duplicates (6kyu) (0) | 2018.07.05 |
codewars #71 Triple trouble (6kyu) (0) | 2018.07.03 |
codewars #70 IQ Test (6kyu) (0) | 2018.07.02 |
codewars #69 Weight for weight (5kyu) (0) | 2018.06.28 |