aoc2024/day-24/internal/one/zwire.go
2024-12-26 13:45:37 +00:00

23 lines
279 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
}