Commit 6570ea3c authored by Qais Patankar's avatar Qais Patankar Committed by Brad Fitzpatrick

container/heap: clarify that Remove returns the removed element

Change-Id: I63b59c1ca8265e9af7eb3f9210ee1d17925de891
Reviewed-on: https://go-review.googlesource.com/129779Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent edae0ff8
...@@ -66,8 +66,8 @@ func Pop(h Interface) interface{} { ...@@ -66,8 +66,8 @@ func Pop(h Interface) interface{} {
return h.Pop() return h.Pop()
} }
// Remove removes the element at index i from the heap. // Remove removes the element at index i from the heap and returns
// The complexity is O(log(n)) where n = h.Len(). // the element. The complexity is O(log(n)) where n = h.Len().
// //
func Remove(h Interface, i int) interface{} { func Remove(h Interface, i int) interface{} {
n := h.Len() - 1 n := h.Len() - 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment