Last active
April 19, 2020 17:23
-
-
Save onelharrison/5b38ad9902e26e3c3eac521eb4c6f49d to your computer and use it in GitHub Desktop.
Compact increment of a recursive function that reverses a 0- and 1-node linked list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def reverse_linked_list_recursive(head): | |
| if head is None or head.next_node is None: | |
| return head |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment