📝Given a list of integers nums. You need to move all zeros to the end of the list while preserving the original order of non-zero elements.
Example:
Input: [1, 0, 1, 2, 0, 1, 3]
Output: [1, 1, 2, 1, 3, 0, 0]There are dozens of ways to do it, but which one is optimal and concise? Your options in the comments 👇
#algosobes
Comentários
0Ainda não há comentários.
Entre para participar da conversa.