mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-10 06:40:47 +00:00
21 lines
277 B
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[j].name < b[i].name
|
|
}
|
|
func (b byName) Swap(i, j int) {
|
|
b[i], b[j] = b[j], b[i]
|
|
}
|
|
|
|
type zWire struct {
|
|
name string
|
|
value int
|
|
}
|