kyu_4.snail package

Submodules

kyu_4.snail.snail_sort module

Solution for -> Snail.

Returns the array elements arranged from outermost elements to the middle element, traveling clockwise.

Created by Egor Kostan. GitHub: https://github.com/ikostan

kyu_4.snail.snail_sort.snail(snail_map: list) list[source]

Snail function.

Returns the array elements arranged from outermost elements to the middle element, traveling clockwise.

Parameters:

snail_map – n x n array

Returns:

list of elements arranged from outermost elements to the middle element, traveling clockwise

kyu_4.snail.test_snail module

Test for -> Snail.

Returns the array elements arranged from outermost elements to the middle element, traveling clockwise.

Created by Egor Kostan. GitHub: https://github.com/ikostan

class kyu_4.snail.test_snail.SnailTestCase(methodName='runTest')[source]

Bases: TestCase

Testing snail function.

_classSetupFailed = False
_class_cleanups = []
test_snail()[source]

Testing ‘snail’ function.

Given an n x n array, ‘snail’ function should return the array elements arranged from outermost elements to the middle element, traveling clockwise. :return:

Module contents

Snail Sort package.