Beispiel #1
0
def test_kth_from_end_greater_than_length():
    anime = LinkedList()
    anime.append(1)
    anime.append(3)
    anime.append(8)
    anime.append(2)
    assert anime.kthFromEnd(5) == 'The Value Not Found'
Beispiel #2
0
def test_kth_from_end1_Happy_Path():
    anime = LinkedList()
    anime.append(1)
    anime.append(3)
    anime.append(8)
    anime.append(2)
    assert anime.kthFromEnd(3) == 1
    assert anime.kthFromEnd(1) == 8
Beispiel #3
0
def test_kth_from_end_size1():
    anime = LinkedList()
    anime.append(3)
    assert anime.kthFromEnd(0) == 3