Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SortedList ¶
type SortedList struct {
// contains filtered or unexported fields
}
func NewSortedList ¶
func NewSortedList() *SortedList
func (*SortedList) Delete ¶
func (sl *SortedList) Delete(key int64)
Delete removes one occurrence of key if present.
func (*SortedList) GetByIndex ¶
func (sl *SortedList) GetByIndex(index int) (int64, bool)
GetByIndex returns the key stored at a 0-based position.
func (*SortedList) Insert ¶
func (sl *SortedList) Insert(key int64)
Insert adds a key occurrence to the structure.
func (*SortedList) Keys ¶
func (sl *SortedList) Keys() []int64
Keys returns all keys in ascending order, including duplicates.
func (*SortedList) Len ¶
func (sl *SortedList) Len() int
func (*SortedList) Merge ¶
func (sl *SortedList) Merge(other *SortedList)
Merge inserts all keys from other into this sorted list.
Click to show internal directories.
Click to hide internal directories.