Skip to content

Add support for a custom comparator function. #49

@segevfiner

Description

@segevfiner

Keys are currently compared using <, it would be nice to be able to specify a custom comparison function for cases where you want to use the tree as a set and need to key values in a different way.

It would be also interesting to create some version/optimization for this cases in terms of only having a key without a value.

P.S. Some methods of AvlTree such as getLeft/getRight end up returning BinarySearchTreeNode instead of AvlTreeNode.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions