Documentation ¶
Overview ¶
Package day06_2019 contains the solver for Advent of Code - Day 6: Universal Orbit Map
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph represents a directed adj where the nodes are strings
func (*Graph) NodeExists ¶
NodeExists tells if a node exists in the adj
func (*Graph) Path ¶
Path returns list of nodes in the path from startNode to endNode. The current implementation naively traverses the adj by only checking the first neighbor of each node. This is ok for the problem being solved, where we know the adj is a tree and we can safely assume there's always a direct path between start and end
type Solver ¶
type Solver struct { // Graph from COM to the other orbits. Intended to solve part 1. GraphFromCOM Graph // Graph from the other orbits to COM. Intended to solve part 2. GraphToCOM Graph }
Solver implements the puzzle.Solver interface for the puzzle for day 6
func (*Solver) ProcessInput ¶
ProcessInput processes the input by transforming into a list of wires. Required to implement Solver.