generic
generic copied to clipboard
Support for sorting elements in descending order in AVL tree
avl.New[int, string](g.Less[int])
We should be able to use a custom comparator for sorting elements but currently that is not supported
This can be accomplished by adding the following func in the generic.go
file
func Greater[T constraints.Ordered](a, b T) bool {
return a > b
}