educative.io

Is_palindrome_1 is not working for every data

Hello,
the first solution of the is_palindrome method doesn’t work if the length of the data is greater than 1.
Example:

llist = LinkedList()
llist.append(“ab”)
llist.append(“cd”)
llist.append(“ab”)

llist.is_palindrome_1()

will return False instead of True
Best regards
Miguel


Course: Educative: Interactive Courses for Software Developers
Lesson: Educative: Interactive Courses for Software Developers