Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement index_range and index_of with tests #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ByteAlex
Copy link

@ByteAlex ByteAlex commented Sep 2, 2023

Resolves #25

I choose to use a Range instead of working with Bound for the range_index method, I hope this works out for you.

The iter_range utility function in OrderedSkipList is mostly copied from the SkipList, but I had to apply some small changes for it to pass tests.

first >= last instead of first > last on the first check and for the get_index I had to -1, as it created a 0..1 iter for a 0..0 range.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

index_of & index_range support
1 participant