util

package
v0.0.0-...-7253c86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphNode

type GraphNode struct {
	Val       int
	Neighbors []*GraphNode
}

type IntHeap

type IntHeap [][2]int

func (IntHeap) Len

func (h IntHeap) Len() int

func (IntHeap) Less

func (h IntHeap) Less(i, j int) bool

func (*IntHeap) Pop

func (h *IntHeap) Pop() interface{}

func (*IntHeap) Push

func (h *IntHeap) Push(x interface{})

func (IntHeap) Swap

func (h IntHeap) Swap(i, j int)

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

type ListNodeWithRandom

type ListNodeWithRandom struct {
	Val    int
	Next   *ListNodeWithRandom
	Random *ListNodeWithRandom
}

type MaxHeap

type MaxHeap []int

func (MaxHeap) Len

func (h MaxHeap) Len() int

func (MaxHeap) Less

func (h MaxHeap) Less(i, j int) bool

func (*MaxHeap) Pop

func (h *MaxHeap) Pop() interface{}

func (*MaxHeap) Push

func (h *MaxHeap) Push(x interface{})

func (MaxHeap) Swap

func (h MaxHeap) Swap(i, j int)

type MinHeap

type MinHeap []int

func (MinHeap) Len

func (h MinHeap) Len() int

func (MinHeap) Less

func (h MinHeap) Less(i, j int) bool

func (*MinHeap) Pop

func (h *MinHeap) Pop() interface{}

func (*MinHeap) Push

func (h *MinHeap) Push(x interface{})

func (MinHeap) Swap

func (h MinHeap) Swap(i, j int)

type MinHeapPoint

type MinHeapPoint []Point

func (MinHeapPoint) Len

func (h MinHeapPoint) Len() int

func (MinHeapPoint) Less

func (h MinHeapPoint) Less(i, j int) bool

func (*MinHeapPoint) Pop

func (h *MinHeapPoint) Pop() interface{}

func (*MinHeapPoint) Push

func (h *MinHeapPoint) Push(x interface{})

func (MinHeapPoint) Swap

func (h MinHeapPoint) Swap(i, j int)

type Point

type Point struct {
	Distance int
	Index    int
}

type TreeNode

type TreeNode struct {
	Val   int
	Left  *TreeNode
	Right *TreeNode
}

type TrieNode

type TrieNode struct {
	Content  byte
	Children [26]*TrieNode
	IsWord   bool
}

type TrieNodeWithWord

type TrieNodeWithWord struct {
	Word     string
	Children [26]*TrieNodeWithWord
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL