You are viewing a single comment's thread. Return to all comments →
python3 version:
def Reverse(head): if not head: return head head.next, head.prev = head.prev, head.next if not head.prev: return head return Reverse(head.prev)
Seems like cookies are disabled on this browser, please enable them to open this website
Reverse a doubly linked list
You are viewing a single comment's thread. Return to all comments →
python3 version: