Skip to content

Commit

Permalink
Generate remaining days
Browse files Browse the repository at this point in the history
  • Loading branch information
nlowe committed Jan 4, 2024
1 parent 735f11f commit b8edc06
Show file tree
Hide file tree
Showing 141 changed files with 12,021 additions and 0 deletions.
40 changes: 40 additions & 0 deletions challenge/cmd/cmd.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions challenge/day10/a.go
@@ -0,0 +1,23 @@
package day10

import (
"fmt"

"github.com/spf13/cobra"

"github.com/nlowe/aoc2023/challenge"
)

func aCommand() *cobra.Command {
return &cobra.Command{
Use: "a",
Short: "Day 10, Problem A",
Run: func(_ *cobra.Command, _ []string) {
fmt.Printf("Answer: %d\n", partA(challenge.FromFile()))
},
}
}

func partA(challenge *challenge.Input) int {
panic("Not implemented!")
}
19 changes: 19 additions & 0 deletions challenge/day10/a_test.go
@@ -0,0 +1,19 @@
package day10

import (
"testing"

"github.com/stretchr/testify/require"

"github.com/nlowe/aoc2023/challenge"
)

func TestA(t *testing.T) {
t.Skip("Not Implemented")

input := challenge.FromLiteral("foobar")

result := partA(input)

require.Equal(t, 42, result)
}
23 changes: 23 additions & 0 deletions challenge/day10/b.go
@@ -0,0 +1,23 @@
package day10

import (
"fmt"

"github.com/spf13/cobra"

"github.com/nlowe/aoc2023/challenge"
)

func bCommand() *cobra.Command {
return &cobra.Command{
Use: "b",
Short: "Day 10, Problem B",
Run: func(_ *cobra.Command, _ []string) {
fmt.Printf("Answer: %d\n", partB(challenge.FromFile()))
},
}
}

func partB(challenge *challenge.Input) int {
panic("Not implemented!")
}
19 changes: 19 additions & 0 deletions challenge/day10/b_test.go
@@ -0,0 +1,19 @@
package day10

import (
"testing"

"github.com/stretchr/testify/require"

"github.com/nlowe/aoc2023/challenge"
)

func TestB(t *testing.T) {
t.Skip("Not Implemented")

input := challenge.FromLiteral("foobar")

result := partB(input)

require.Equal(t, 42, result)
}
19 changes: 19 additions & 0 deletions challenge/day10/benchmark_test.go
@@ -0,0 +1,19 @@
package day10

import (
"testing"

"github.com/nlowe/aoc2023/challenge"
)

func BenchmarkA(b *testing.B) {
for i := 0; i < b.N; i++ {
_ = partA(challenge.FromFile())
}
}

func BenchmarkB(b *testing.B) {
for i := 0; i < b.N; i++ {
_ = partB(challenge.FromFile())
}
}
17 changes: 17 additions & 0 deletions challenge/day10/import.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

140 changes: 140 additions & 0 deletions challenge/day10/input.txt

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions challenge/day11/a.go
@@ -0,0 +1,23 @@
package day11

import (
"fmt"

"github.com/spf13/cobra"

"github.com/nlowe/aoc2023/challenge"
)

func aCommand() *cobra.Command {
return &cobra.Command{
Use: "a",
Short: "Day 11, Problem A",
Run: func(_ *cobra.Command, _ []string) {
fmt.Printf("Answer: %d\n", partA(challenge.FromFile()))
},
}
}

func partA(challenge *challenge.Input) int {
panic("Not implemented!")
}
19 changes: 19 additions & 0 deletions challenge/day11/a_test.go
@@ -0,0 +1,19 @@
package day11

import (
"testing"

"github.com/stretchr/testify/require"

"github.com/nlowe/aoc2023/challenge"
)

func TestA(t *testing.T) {
t.Skip("Not Implemented")

input := challenge.FromLiteral("foobar")

result := partA(input)

require.Equal(t, 42, result)
}
23 changes: 23 additions & 0 deletions challenge/day11/b.go
@@ -0,0 +1,23 @@
package day11

import (
"fmt"

"github.com/spf13/cobra"

"github.com/nlowe/aoc2023/challenge"
)

func bCommand() *cobra.Command {
return &cobra.Command{
Use: "b",
Short: "Day 11, Problem B",
Run: func(_ *cobra.Command, _ []string) {
fmt.Printf("Answer: %d\n", partB(challenge.FromFile()))
},
}
}

func partB(challenge *challenge.Input) int {
panic("Not implemented!")
}
19 changes: 19 additions & 0 deletions challenge/day11/b_test.go
@@ -0,0 +1,19 @@
package day11

import (
"testing"

"github.com/stretchr/testify/require"

"github.com/nlowe/aoc2023/challenge"
)

func TestB(t *testing.T) {
t.Skip("Not Implemented")

input := challenge.FromLiteral("foobar")

result := partB(input)

require.Equal(t, 42, result)
}
19 changes: 19 additions & 0 deletions challenge/day11/benchmark_test.go
@@ -0,0 +1,19 @@
package day11

import (
"testing"

"github.com/nlowe/aoc2023/challenge"
)

func BenchmarkA(b *testing.B) {
for i := 0; i < b.N; i++ {
_ = partA(challenge.FromFile())
}
}

func BenchmarkB(b *testing.B) {
for i := 0; i < b.N; i++ {
_ = partB(challenge.FromFile())
}
}
17 changes: 17 additions & 0 deletions challenge/day11/import.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b8edc06

Please sign in to comment.