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

Max and Min #13

Open
gitperson1980 opened this issue Sep 3, 2022 · 2 comments
Open

Max and Min #13

gitperson1980 opened this issue Sep 3, 2022 · 2 comments

Comments

@gitperson1980
Copy link

How does one easily get the max and min value in the sorted set without ranging?

@zhangyunhao116
Copy link
Owner

Hmm, not a good way to get both of them for now.
For ascending skipset, the min value is the first one; for descending skipset, the max value is the first one. Iterate from the highest level is the most effective way to get the max(min) value in the ascending(descending) skipset.

@gitperson1980
Copy link
Author

Hmm, not a good way to get both of them for now. For ascending skipset, the min value is the first one; for descending skipset, the max value is the first one. Iterate from the highest level is the most effective way to get the max(min) value in the ascending(descending) skipset.

Is there a way to get min:=set[0] and max:=set[len(set)]

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

No branches or pull requests

2 participants