Documentation ¶
Index ¶
- func BSTSortedOrder(root *BST) []int
- func BinaryTreeLevelOrder(root *BST) [][]int
- func SearchPostingsListIterative(head *PostingsListElement)
- func SearchPostingsListRecursive(head *PostingsListElement)
- func SlidingWindow(t []TrafficElement, w int) []int
- func StackSorting(st *IntStack)
- func TowerHanoi(n int)
- type BST
- type IntStack
- type PostingsListElement
- type PostingsListElementStack
- type QueueWithMax
- type Stack
- type StackWithMax
- type StackedQueue
- type TrafficElement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BSTSortedOrder ¶
func BinaryTreeLevelOrder ¶
func SearchPostingsListIterative ¶
func SearchPostingsListIterative(head *PostingsListElement)
func SearchPostingsListRecursive ¶
func SearchPostingsListRecursive(head *PostingsListElement)
func SlidingWindow ¶
func SlidingWindow(t []TrafficElement, w int) []int
func StackSorting ¶
func StackSorting(st *IntStack)
func TowerHanoi ¶
func TowerHanoi(n int)
Types ¶
type PostingsListElement ¶
type PostingsListElement struct { Value int Order int Next *PostingsListElement Jump *PostingsListElement }
type PostingsListElementStack ¶
type PostingsListElementStack []*PostingsListElement
func (*PostingsListElementStack) Pop ¶
func (st *PostingsListElementStack) Pop() (*PostingsListElement, error)
func (*PostingsListElementStack) Push ¶
func (st *PostingsListElementStack) Push(x *PostingsListElement)
type QueueWithMax ¶
type QueueWithMax struct {
// contains filtered or unexported fields
}
func NewQueueWithMax ¶
func NewQueueWithMax() *QueueWithMax
func (*QueueWithMax) Dequeue ¶
func (qwm *QueueWithMax) Dequeue() (int, error)
func (*QueueWithMax) Enqueue ¶
func (qwm *QueueWithMax) Enqueue(n int)
func (*QueueWithMax) Max ¶
func (qwm *QueueWithMax) Max() (int, error)
type StackWithMax ¶
type StackWithMax struct {
// contains filtered or unexported fields
}
func (*StackWithMax) Max ¶
func (s *StackWithMax) Max() (int, error)
func (*StackWithMax) Pop ¶
func (s *StackWithMax) Pop() (int, error)
func (*StackWithMax) Push ¶
func (s *StackWithMax) Push(x int)
type StackedQueue ¶
type StackedQueue struct {
// contains filtered or unexported fields
}
func NewStackedQueue ¶
func NewStackedQueue() *StackedQueue
func (*StackedQueue) Dequeue ¶
func (sq *StackedQueue) Dequeue() (int, error)
func (*StackedQueue) Enqueue ¶
func (sq *StackedQueue) Enqueue(n int)
type TrafficElement ¶
type TrafficElement struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.