My LeetCode grinding. Trying to do a problem a day.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

problem.txt 306B

123456789101112
  1. Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.
  2. Example:
  3. Input: [0,1,0,3,12]
  4. Output: [1,3,12,0,0]
  5. Note:
  6. You must do this in-place without making a copy of the array.
  7. Minimize the total number of operations.