refactor: standardize PartOne/PartTwo declarations

This commit is contained in:
2025-11-28 09:01:11 +01:00
parent 62969312e3
commit 3fb71d0cbf
4 changed files with 22 additions and 24 deletions

View File

@@ -39,9 +39,9 @@ func ParseInput(filepath string) []string {
return strings.Split(string(content), "\n")
}
func PartOne(input []string) int {
func PartOne(data []string) int {
maxSeatID := 0
for _, pass := range input {
for _, pass := range data {
seatID := calculateSeatID(pass)
if seatID > maxSeatID {
maxSeatID = seatID
@@ -50,12 +50,12 @@ func PartOne(input []string) int {
return maxSeatID
}
func PartTwo(input []string) int {
func PartTwo(data []string) int {
seatIDs := make(map[int]bool)
minSeatID := 1000
maxSeatID := 0
for _, pass := range input {
for _, pass := range data {
if len(pass) < 10 {
continue
}