Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderedIntSet ¶
OrderedIntSet is a thread-safe sorted set and a stack.
func NewOrderedIntSet ¶
func NewOrderedIntSet() *OrderedIntSet
NewOrderedSet returns an initialized OrderedSet
func (*OrderedIntSet) Exists ¶
func (s *OrderedIntSet) Exists(elem int) bool
Exists checks if the given element present in the list.
func (*OrderedIntSet) PopFront ¶
func (s *OrderedIntSet) PopFront() int
Pop returns the first elemen from the list and removes it. If the list is empty, it returns 0
func (*OrderedIntSet) PullBack ¶
func (s *OrderedIntSet) PullBack() int
PullBack retrieve the last element of the list. The element is not removed. If the list is empty, an empty element is returned.
func (*OrderedIntSet) Push ¶
func (s *OrderedIntSet) Push(elem int)
Push takes a string and adds it to the set. If the elem aready exists, it has no effect.
func (*OrderedIntSet) Remove ¶
func (s *OrderedIntSet) Remove(elem int)
Remove removes an element from the list. If the element is not found, it has no effect.
Click to show internal directories.
Click to hide internal directories.