Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equals ¶ added in v0.0.7
func Equals[T comparable](x, y T) bool
func Less ¶ added in v0.0.7
func Less[T constraints.Ordered](x, y T) bool
Types ¶
type BST ¶ added in v0.0.7
type BST[T comparable] struct { Length int Head *BSTNode[T] Less LessFn[T] }
func NewBST ¶ added in v0.0.7
func NewBST[T comparable](less LessFn[T]) *BST[T]
func (*BST[T]) InorderTraversal ¶ added in v0.0.7
func (b *BST[T]) InorderTraversal() []T
func (*BST[T]) PostorderTraversal ¶ added in v0.0.7
func (b *BST[T]) PostorderTraversal() []T
func (*BST[T]) PreorderTraversal ¶ added in v0.0.7
func (b *BST[T]) PreorderTraversal() []T
type BSTNode ¶ added in v0.0.7
type BSTNode[T comparable] struct { Val T Left *BSTNode[T] Right *BSTNode[T] }
type EqualsFn ¶ added in v0.0.7
type EqualsFn[T comparable] func(x, y T) bool
type Heap ¶ added in v0.0.7
type Heap[T comparable] struct { Length int Data []T // contains filtered or unexported fields }
func NewHeap ¶ added in v0.0.7
func NewHeap[T comparable](less LessFn[T]) *Heap[T]
type LessFn ¶ added in v0.0.7
type LessFn[T comparable] func(x, y T) bool
type Set ¶ added in v0.0.5
type Set[T comparable] struct { Length int Data map[T]interface{} }
func NewSet ¶ added in v0.0.5
func NewSet[T comparable]() *Set[T]
Source Files
¶
Click to show internal directories.
Click to hide internal directories.