Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save onelharrison/43d40ed3f9a7826c5bedab75ef0dcf2e to your computer and use it in GitHub Desktop.
Save onelharrison/43d40ed3f9a7826c5bedab75ef0dcf2e to your computer and use it in GitHub Desktop.
Increment of a recursive function that reverses an empty linked list
def reverse_linked_list_recursive(head):
if head is None: # handles empty linked list
return head
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment