Skip to content

Binary Search Tree Iterator find should return lower bound of found node #147

@domfarolino

Description

@domfarolino

Some cursory research shows that std::multiset::find returns an iterator to the lowest node matching the given key. For example, this means if a tree consists only of one node value, but many duplicates of it, then the find(val) operation will always return an iterator that equals begin().

I don't believe this repository's binary search tree implementation has the same lower-bound find guarantee, but we should check, change our implementation if necessary, and add tests regardless.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions