go-art
go-art copied to clipboard
Inserted Key needs to be preserved and accessible by the current Node
As requested by a few users, it seems like it would be pretty useful to access the inserted key of the current node. Currently, this isn't possible because the path compression implementation alters the key so it's null terminated to differentiate between an internal node and a leaf node.
Suggested implementation:
- Add another field to each Leaf Node such that it can remember the actual key it was inserted in.
- Provide a Getter function that returns the original Key of the current node.