Skip to content

Commit

Permalink
Remove backslashes from is_palindrome.py (TheAlgorithms#10169)
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored and sedatguzelsemme committed Sep 15, 2024
1 parent f929924 commit 3ae54e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions data_structures/linked_list/is_palindrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,11 @@ def is_palindrome_dict(head: ListNode | None) -> bool:
>>> is_palindrome_dict(ListNode(1, ListNode(2, ListNode(2, ListNode(1)))))
True
>>> is_palindrome_dict(\
ListNode(\
1, ListNode(2, ListNode(1, ListNode(3, ListNode(2, ListNode(1)))))))
>>> is_palindrome_dict(
... ListNode(
... 1, ListNode(2, ListNode(1, ListNode(3, ListNode(2, ListNode(1)))))
... )
... )
False
"""
if not head or not head.next_node:
Expand Down

0 comments on commit 3ae54e7

Please sign in to comment.