added the skeleton from day4
This commit is contained in:
parent
80cd2210a3
commit
d388972aee
11 changed files with 728 additions and 5 deletions
|
@ -40,7 +40,7 @@ func main() {
|
|||
result := Part1(ConvertToUsefulData(GetData("./data")))
|
||||
fmt.Printf("The Power consumption is: %d\n", result)
|
||||
|
||||
data := ConvertToUsefulData(GetData("./test-data"))
|
||||
oxy, co2 := Part2(ConvertToUsefulData(GetData("./test-data")))
|
||||
for _, f := range data {
|
||||
fmt.Println(f)
|
||||
}
|
||||
|
@ -121,10 +121,8 @@ func Cycle(data [][]uint, i int) [][]uint {
|
|||
|
||||
func Part2(data [][]uint) (uint, uint) {
|
||||
ordered := dataSliceConvert(data)
|
||||
oxygenRate := Cycle(ordered, 0)
|
||||
for i := range ordered[0] {
|
||||
oxygenRate := Cycle(oxygenRate, i)
|
||||
fmt.Println(oxygenRate)
|
||||
for _, d := range ordered {
|
||||
fmt.Println(d)
|
||||
}
|
||||
|
||||
return 0, 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue