Palindrome Linked List, code is not passing the test case

前端 未结 0 553
旧巷少年郎
旧巷少年郎 2020-11-29 14:06

Here is my code:

    if head and head.next is None:
        return True
    current = head
    prev = None
    nex = None
    while current:
        nex = cur         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题