MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / PopMin

Method PopMin

sorted_set.go:488–494  ·  view source on GitHub ↗

PopMin returns and remove the element with minimal score, nil if the set is empty. Time complexity of this method is : O(log(N)).

()

Source from the content-addressed store, hash-verified

486//
487// Time complexity of this method is : O(log(N)).
488func (sl *SkipList) PopMin() *SkipListNode {
489 x := sl.header.level[0].forward
490 if x != nil {
491 sl.Remove(x.hash)
492 }
493 return x
494}
495
496// PeekMax returns the element with maximum score, nil if the set is empty.
497//

Callers

nothing calls this directly

Calls 1

RemoveMethod · 0.95

Tested by

no test coverage detected