Exemple #1
0
def palindrome_doubly_ll_Mon():
    doubly_ll = DoublyLinkedList()
    doubly_ll.insert('M')
    doubly_ll.insert('o')
    doubly_ll.insert('m')
    expected = True

    actual = palindrome_doubly_ll(doubly_ll)

    assert actual == expected, "Error on palindrome_doubly_ll_Mom."
Exemple #2
0
def palindrome_doubly_ll_word():
    doubly_ll = DoublyLinkedList()
    doubly_ll.insert('w')
    doubly_ll.insert('o')
    doubly_ll.insert('r')
    doubly_ll.insert('d')
    expected = False

    actual = palindrome_doubly_ll(doubly_ll)

    assert actual == expected, "Error on palindrome_doubly_ll_word."
Exemple #3
0
def palindrome_doubly_ll_kayak():
    doubly_ll = DoublyLinkedList()
    doubly_ll.insert('k')
    doubly_ll.insert('a')
    doubly_ll.insert('y')
    doubly_ll.insert('a')
    doubly_ll.insert('k')
    expected = True

    actual = palindrome_doubly_ll(doubly_ll)

    assert actual == expected, "Error on palindrome_doubly_ll_kayak."
Exemple #4
0
def palindrome_doubly_ll_abcde():
    doubly_ll = DoublyLinkedList()
    doubly_ll.insert('a')
    doubly_ll.insert('b')
    doubly_ll.insert('c')
    doubly_ll.insert('d')
    doubly_ll.insert('e')
    expected = False

    actual = palindrome_doubly_ll(doubly_ll)

    assert actual == expected, "Error on palindrome_doubly_ll_abcde."