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

container/heap: docs do not clearly state that element 0 is minimum element #5577

Closed
ianlancetaylor opened this issue May 28, 2013 · 3 comments

Comments

@ianlancetaylor
Copy link
Contributor

I believe the implementation of container/heap implies that the 0 element is always the
minimum element.  Thus you can always peek at the minimum element without actually
popping it by simply looking at h[0].  But the docs don't actually state this, and there
is no Top method that lets you look at the minimum element without removing it.
@robpike
Copy link
Contributor

robpike commented May 28, 2013

Comment 1:

Owner changed to @griesemer.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 2:

Labels changed: added go1.2maybe.

@griesemer
Copy link
Contributor

Comment 3:

This issue was closed by revision dd6f49d.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants