Glossary: Coding Interviews in Go
slices.SortFunc
Also written: SortStableFunc
A Go function that sorts a slice using a comparison function you write, which returns a negative number, zero or a positive number. It lets you sort structs by a field.
Glossary: Coding Interviews in Go
Also written: SortStableFunc
A Go function that sorts a slice using a comparison function you write, which returns a negative number, zero or a positive number. It lets you sort structs by a field.