aoc2024/day-24/internal/one/zwire.go

21 lines
277 B
Go

package one
const noValue = -1
type byName []zWire
func (b byName) Len() int {
return len(b)
}
func (b byName) Less(i, j int) bool {
return b[i].name < b[j].name
}
func (b byName) Swap(i, j int) {
b[i], b[j] = b[j], b[i]
}
type zWire struct {
name string
value int
}