add some comments
This commit is contained in:
parent
0883efd35e
commit
e1d3ca5ea2
@ -209,6 +209,9 @@ func partTwo() {
|
||||
}
|
||||
guesses := guessFields(rules, tickets)
|
||||
var lastRuleSolved int
|
||||
// iterate over the guesses list. on every iteration, only one field has only one rule remaining that's valid
|
||||
// save it off into the rules list, then remove that rule from all fields.
|
||||
// Luckily, we don't need any higher-order elimination logic.
|
||||
for i := 1; i < len(guesses); i++ {
|
||||
for i, g := range guesses {
|
||||
if len(g) == 1 {
|
||||
|
Loading…
Reference in New Issue
Block a user