kyu_7.fun_with_lists_length package

Submodules

kyu_7.fun_with_lists_length.length module

kyu_7.fun_with_lists_length.length.length(head) → int[source]

The method length, which accepts a linked list (head), and returns the length of the list. :param head: :return:

kyu_7.fun_with_lists_length.node module

class kyu_7.fun_with_lists_length.node.Node(data, next=None)[source]

Bases: object

The linked list

kyu_7.fun_with_lists_length.test_length module

class kyu_7.fun_with_lists_length.test_length.LengthTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing length function

test_length()[source]

Testing length function

The method length, which accepts a linked list (head), and returns the length of the list. :return:

test_length_none()[source]

Testing length function where head = None

The method length, which accepts a linked list (head), and returns the length of the list. :return:

Module contents