Skip to content

Instantly share code, notes, and snippets.

@nhuntwalker
Last active November 8, 2017 19:35
Show Gist options
  • Save nhuntwalker/fdd3454707381812feeabf6bb2ab8077 to your computer and use it in GitHub Desktop.
Save nhuntwalker/fdd3454707381812feeabf6bb2ab8077 to your computer and use it in GitHub Desktop.
Write a function that takes in two linked lists and will return a boolean that tells me whether or not those linked lists merge or don't
These two merge:
[ 1 ] - [ 2 ] - [ 3 ] - [ 4 ]
|
[ A ] - [ B ] ----
These two also merge:
[ 1 ] -> [ 2 ] -> [ 3 ] -> [ 4 ]
^
|
[ A ] -> [ B ] -> [ C ] ---->
These two don't:
[ 1 ] -> [ 2 ] -> [ 3 ] -> [ 4 ]
[ A ] -> [ B ] -> [ C ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment