
Image credit to https://www.includehelp.com
Usually linked lists end with a node with no next
reference, but we're looking for a sequence with a next
pointer to a previous node. What might be the brute force solution here?
xxxxxxxxxx
// 1 -> 3 <-> 5
// |
// 7
OUTPUT
:001 > Cmd/Ctrl-Enter to run, Cmd/Ctrl-/ to comment