Rename shared packages by day instead of vaguely by purpose.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package calibration
|
||||
package day01
|
||||
|
||||
import (
|
||||
"bufio"
|
@ -1,5 +1,4 @@
|
||||
// Used by both parts of day 03
|
||||
package fabric
|
||||
package day03
|
||||
|
||||
import (
|
||||
"strconv"
|
@ -1,4 +1,4 @@
|
||||
package guards
|
||||
package day04
|
||||
|
||||
import (
|
||||
"sort"
|
@ -1,5 +1,5 @@
|
||||
// Functions for operating on polymers from day 5.
|
||||
package polymer
|
||||
package day05
|
||||
|
||||
import (
|
||||
"bytes"
|
@ -1,4 +1,4 @@
|
||||
package coords
|
||||
package day06
|
||||
|
||||
import (
|
||||
"strconv"
|
@ -1,7 +1,7 @@
|
||||
// BreadthFirstOrder and its companion functions ended up not giving the
|
||||
// right solution, but I'm leaving them here as a useful generic tree
|
||||
// algorithm.
|
||||
package tree
|
||||
package day07
|
||||
|
||||
func BreadthFirstOrder(root *Node) []*Node {
|
||||
seen := make(map[rune]bool)
|
@ -1,4 +1,4 @@
|
||||
package tree
|
||||
package day07
|
||||
|
||||
func SimulateConstruction(root *Node) int {
|
||||
working := make(map[rune]*Node)
|
@ -1,4 +1,4 @@
|
||||
package tree
|
||||
package day07
|
||||
|
||||
import (
|
||||
"fmt"
|
@ -1,4 +1,4 @@
|
||||
package tree
|
||||
package day07
|
||||
|
||||
// FindOrder determines the correct order according to these rules:
|
||||
// 1. A node cannot come before all of its parents have been included.
|
@ -1,4 +1,4 @@
|
||||
package tree
|
||||
package day07
|
||||
|
||||
import (
|
||||
"regexp"
|
Reference in New Issue
Block a user