kyu_5.find_the_smallest package

Submodules

kyu_5.find_the_smallest.solution module

kyu_5.find_the_smallest.solution.concat_new_n(digits: list, min_digit: int, min_index: int) → list[source]
kyu_5.find_the_smallest.solution.get_min_digit(digits: list) → int[source]
kyu_5.find_the_smallest.solution.smallest(n: int) → list[source]

Return an array or a tuple or a string depending on the language (see “Sample Tests”) with

  1. the smallest number you got

  2. the index i of the digit d you took, i as small as possible

  3. the index j (as small as possible) where you insert this digit d to have the smallest number.

Parameters

n – a positive number n consisting of digits

Returns

an array with: smallest number, index, digit

kyu_5.find_the_smallest.test_smallest module

class kyu_5.find_the_smallest.test_smallest.FindSmallestTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing smallest function

pytestmark = [Mark(name='skip', args=(), kwargs={'reason': 'The solution is not ready'})]
test_smallest()[source]

Test a function smallest which will return an array or a tuple or a string depending on the language (see “Sample Tests”) with

  1. the smallest number you got

  2. the index i of the digit d you took, i as small as possible

  3. the index j (as small as possible) where you insert this digit d to have the smallest number.

Returns

Module contents