From 4b4e0436f77e286bad09952957815b51dbe29877 Mon Sep 17 00:00:00 2001 From: Egor Kostan Date: Mon, 9 Dec 2024 19:55:17 -0800 Subject: [PATCH] Moving Zeros To The End --- kyu_5/moving_zeros_to_the_end/__init__.py | 1 + kyu_5/moving_zeros_to_the_end/move_zeros.py | 5 ++++- kyu_5/moving_zeros_to_the_end/test_move_zeros.py | 9 +++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/kyu_5/moving_zeros_to_the_end/__init__.py b/kyu_5/moving_zeros_to_the_end/__init__.py index e69de29bb2d..a030ec46206 100644 --- a/kyu_5/moving_zeros_to_the_end/__init__.py +++ b/kyu_5/moving_zeros_to_the_end/__init__.py @@ -0,0 +1 @@ +"""Moving Zeros To The End.""" diff --git a/kyu_5/moving_zeros_to_the_end/move_zeros.py b/kyu_5/moving_zeros_to_the_end/move_zeros.py index 9a096d86409..36551e9867d 100644 --- a/kyu_5/moving_zeros_to_the_end/move_zeros.py +++ b/kyu_5/moving_zeros_to_the_end/move_zeros.py @@ -1,5 +1,6 @@ """ -Solution for -> Moving Zeros To The End +Solution for -> Moving Zeros To The End. + Created by Egor Kostan. GitHub: https://github.com/ikostan """ @@ -7,6 +8,8 @@ def move_zeros(array: list) -> list: """ + move_zeros function. + An algorithm that takes an array and moves all of the zeros to the end, preserving the order of the other elements. :param array: list diff --git a/kyu_5/moving_zeros_to_the_end/test_move_zeros.py b/kyu_5/moving_zeros_to_the_end/test_move_zeros.py index 6952978478e..b6d595dc71c 100644 --- a/kyu_5/moving_zeros_to_the_end/test_move_zeros.py +++ b/kyu_5/moving_zeros_to_the_end/test_move_zeros.py @@ -1,5 +1,6 @@ """ -Test for -> Moving Zeros To The End +Test for -> Moving Zeros To The End. + Created by Egor Kostan. GitHub: https://github.com/ikostan """ @@ -28,12 +29,12 @@ name='Source/Kata') # pylint: enable-msg=R0801 class MoveZerosTestCase(unittest.TestCase): - """ - Testing move_zeros function - """ + """Testing move_zeros function.""" def test_move_zeros(self): """ + Testing move_zeros function with various test data. + Test an algorithm that takes an array and moves all of the zeros to the end, preserving the order of the other elements. :return: