Actually output the answer
This commit is contained in:
parent
97d81128f1
commit
613364fcd4
@ -39,18 +39,18 @@ func part2(inp []string) {
|
||||
if v1 == v2 {
|
||||
continue
|
||||
}
|
||||
var diff int
|
||||
var diff, diffIdx int
|
||||
for k := range v1 {
|
||||
if v1[k] != v2[k] {
|
||||
diff++
|
||||
diffIdx = k
|
||||
}
|
||||
if diff > 1 {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if diff == 1 {
|
||||
fmt.Println(v1)
|
||||
fmt.Println(v2)
|
||||
fmt.Println(v1[:diffIdx] + v1[diffIdx+1:])
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user