Skip to content

Instantly share code, notes, and snippets.

@nhuntwalker
Created May 24, 2017 18:36
Show Gist options
  • Select an option

  • Save nhuntwalker/45107fdad9d2fa1ed38f6085ef01a1dd to your computer and use it in GitHub Desktop.

Select an option

Save nhuntwalker/45107fdad9d2fa1ed38f6085ef01a1dd to your computer and use it in GitHub Desktop.
looped list
[1] -> [2] -> [3] -
^ |
| v
-----------
write a function that takes a linked list as an argument and returns a boolean telling
whether or not that list has a loop in it.
email to: [email protected]
def func(arg):
pass
linked_list = LinkedList([1,2,3])
func(linked_list) ---> False
Due: 11:53am
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment