kyu_6.sort_the_odd package
Submodules
kyu_6.sort_the_odd.solution module
Solution for -> Sort the odd.
Created by Egor Kostan. GitHub: https://github.com/ikostan
kyu_6.sort_the_odd.test_sort_array module
Test for -> Sort the odd.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- class kyu_6.sort_the_odd.test_sort_array.SortArrayTestCase(methodName='runTest')[source]
Bases:
TestCaseTesting ‘sort_array’ function.
- _classSetupFailed = False
- _class_cleanups = []
- test_sort_array = None
- test_sort_array_0(**kw)
The ‘sort_array’ function [with source_array=[5, 3, 2, 8, 1, 4], expected=[1, 3, 2, 8, 5, 4]].
The task is to sort ascending odd numbers but even numbers must be on their places.
Zero isn’t an odd number and you don’t need to move it. If you have an empty array, you need to return it.
- Returns:
- test_sort_array_1(**kw)
The ‘sort_array’ function [with source_array=[5, 3, 1, 8, 0], expected=[1, 3, 5, 8, 0]].
The task is to sort ascending odd numbers but even numbers must be on their places.
Zero isn’t an odd number and you don’t need to move it. If you have an empty array, you need to return it.
- Returns:
- test_sort_array_2(**kw)
The ‘sort_array’ function [with source_array=[], expected=[]].
The task is to sort ascending odd numbers but even numbers must be on their places.
Zero isn’t an odd number and you don’t need to move it. If you have an empty array, you need to return it.
- Returns:
Module contents
Sort the odd.