Skip to content

Instantly share code, notes, and snippets.

@vishwakarma
Created July 5, 2020 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vishwakarma/b6f50e57aef226edc969fe97d9907cc6 to your computer and use it in GitHub Desktop.
Save vishwakarma/b6f50e57aef226edc969fe97d9907cc6 to your computer and use it in GitHub Desktop.
0 -> [1,2]
2 -> [3,4]
(currentNode, currentPath, paths)
0, "", []
-> {1,2}
-> (1, 0, [])
-> XXXXXX paths = [01]
-> (2, 0, [01])
-> {3,4}
-> (3, 02, [01])
-> XXXX paths => [01, 023]
-> (4, 02, [01,023])
-> XXXXX, paths => [01, 023, 024]
paths { 01, 023, 024 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment