Skip to content

Instantly share code, notes, and snippets.

@kalda341
Created February 2, 2015 01:49
Show Gist options
  • Save kalda341/768b3211be2d5af20654 to your computer and use it in GitHub Desktop.
Save kalda341/768b3211be2d5af20654 to your computer and use it in GitHub Desktop.
def get_total(head):
if not head:
return 0
return head.val + get_total(get_next())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment