Day 7.2 solution.
This commit is contained in:
parent
7f0bc4d9f1
commit
42cb05ba7f
3 changed files with 74 additions and 0 deletions
19
2018/day07-2.go
Normal file
19
2018/day07-2.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"internal/tree"
|
||||
"internal/util"
|
||||
)
|
||||
|
||||
func main() {
|
||||
data := util.ReadInput()
|
||||
|
||||
// Build a tree of dependencies.
|
||||
root := tree.BuildDependencyTree(data)
|
||||
|
||||
// Build
|
||||
time := tree.SimulateConstruction(root)
|
||||
fmt.Println(time)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue