Skip to content

Commit

Permalink
Moving Zeros To The End
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostan committed Dec 10, 2024
1 parent ae06d4d commit 4b4e043
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions kyu_5/moving_zeros_to_the_end/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Moving Zeros To The End."""
5 changes: 4 additions & 1 deletion kyu_5/moving_zeros_to_the_end/move_zeros.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
"""
Solution for -> Moving Zeros To The End
Solution for -> Moving Zeros To The End.
Created by Egor Kostan.
GitHub: https://github.com/ikostan
"""


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
Expand Down
9 changes: 5 additions & 4 deletions kyu_5/moving_zeros_to_the_end/test_move_zeros.py
Original file line number Diff line number Diff line change
@@ -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
"""
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 4b4e043

Please sign in to comment.