Function advent_of_code_2021::day_12::build_paths [−][src]
Expand description
Find the start and end indices, initialise a single path at the start position, and an empty list of complete paths. Take nodes from the stack, iterating through the linked caves and pushing all valid new paths back onto the stack (if incomplete) or into the list of complete paths if their updated position is the end node, repeat until the stack is exhausted and return the completed path.
