mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-09 14:20:48 +00:00
23 lines
279 B
Go
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
|
|
}
|