Pergunta de entrevista da empresa Altimetrik

A Js coding question where the input: [2,0,5,4,0] O/p: [2,5,4,0,0]