From 3b218fae015107b2ddbcea2f8257f8c2c5c4b026 Mon Sep 17 00:00:00 2001 From: bt3gl <138340846+bt3gl-google@users.noreply.github.com> Date: Sun, 30 Jul 2023 15:54:34 -0700 Subject: [PATCH] Update array-move-zeros-inplace.py --- arrays_and_strings/array-move-zeros-inplace.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arrays_and_strings/array-move-zeros-inplace.py b/arrays_and_strings/array-move-zeros-inplace.py index 6fc5c68..d34785a 100644 --- a/arrays_and_strings/array-move-zeros-inplace.py +++ b/arrays_and_strings/array-move-zeros-inplace.py @@ -1,3 +1,8 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# author: bt3gl + + ''' Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements. @@ -39,4 +44,4 @@ def move_zeroes(nums: list[int]) -> list[int]: if __name__ == "__main__": nums = [0,1,0,3,12] - assert(move_zeroes(nums) == [1,3,12,0,0]) \ No newline at end of file + assert(move_zeroes(nums) == [1,3,12,0,0])