Documentation ¶
Index ¶
- type Index
- type Queue
- type QueueSlice
- func (q *QueueSlice) Clear()
- func (q *QueueSlice) Copy() Queue
- func (q *QueueSlice) Dequeue() (int, bool)
- func (q *QueueSlice) Enqueue(val int)
- func (q *QueueSlice) Equal(other Queue) bool
- func (q *QueueSlice) Index(index int) (int, bool)
- func (q *QueueSlice) Peek() (int, bool)
- func (q *QueueSlice) Pop() (int, bool)
- func (q *QueueSlice) Push(val int)
- func (q *QueueSlice) Size() int
- type Stack
- type StackArray
- func (s *StackArray) Clear()
- func (s *StackArray) Copy() Stack
- func (s *StackArray) Equal(other Stack) bool
- func (s *StackArray) Index(index int) (int, bool)
- func (s *StackArray) Peek() (int, bool)
- func (s *StackArray) Pop() (int, bool)
- func (s *StackArray) Push(val int)
- func (s *StackArray) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueueSlice ¶
type QueueSlice struct {
// contains filtered or unexported fields
}
func NewQueueSlice ¶
func NewQueueSlice(size int) *QueueSlice
func (*QueueSlice) Clear ¶
func (q *QueueSlice) Clear()
func (*QueueSlice) Copy ¶
func (q *QueueSlice) Copy() Queue
func (*QueueSlice) Dequeue ¶
func (q *QueueSlice) Dequeue() (int, bool)
func (*QueueSlice) Enqueue ¶
func (q *QueueSlice) Enqueue(val int)
func (*QueueSlice) Equal ¶
func (q *QueueSlice) Equal(other Queue) bool
func (*QueueSlice) Peek ¶
func (q *QueueSlice) Peek() (int, bool)
func (*QueueSlice) Pop ¶
func (q *QueueSlice) Pop() (int, bool)
Pop is mapped to the top of the queue, so it acts like a dequeue
func (*QueueSlice) Push ¶
func (q *QueueSlice) Push(val int)
func (*QueueSlice) Size ¶
func (q *QueueSlice) Size() int
type StackArray ¶
type StackArray struct {
Array []int
}
func NewStackArray ¶
func NewStackArray(size int) *StackArray
func (*StackArray) Clear ¶
func (s *StackArray) Clear()
func (*StackArray) Copy ¶
func (s *StackArray) Copy() Stack
func (*StackArray) Equal ¶
func (s *StackArray) Equal(other Stack) bool
func (*StackArray) Peek ¶
func (s *StackArray) Peek() (int, bool)
func (*StackArray) Pop ¶
func (s *StackArray) Pop() (int, bool)
func (*StackArray) Push ¶
func (s *StackArray) Push(val int)
func (*StackArray) Size ¶
func (s *StackArray) Size() int
Directories ¶
Path | Synopsis |
---|---|
Package heap provides heap operations for any type that implements heap.Interface.
|
Package heap provides heap operations for any type that implements heap.Interface. |
Click to show internal directories.
Click to hide internal directories.