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

Add range methods to TreeMap #121

Open
Hackerpilot opened this issue Sep 27, 2018 · 1 comment
Open

Add range methods to TreeMap #121

Hackerpilot opened this issue Sep 27, 2018 · 1 comment
Assignees

Comments

@Hackerpilot
Copy link
Contributor

Since the TreeMap structure guarantees an ordering for its contents, it would be very useful to have front popFront, back, and popBack methods to get the largest or smallest items out of the container.

@CyberShadow
Copy link
Member

I see that d44cb6a added front and back methods which return values, which I guess would correspond to the smallest and biggest keys.

I think for map-like types it would be better to have distinct iterator constructors, like byKey and byValue to facilitate this.

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

No branches or pull requests

2 participants