added the skeleton from day4

This commit is contained in:
ZennDev1337 2023-11-22 14:16:43 +01:00
parent 80cd2210a3
commit d388972aee
11 changed files with 728 additions and 5 deletions

View file

@ -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