structure

package
v0.0.0-...-250739b Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 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 ListNode

type ListNode struct {
	Val  int
	Next *ListNode
	Prev *ListNode
}

func NewListNode

func NewListNode(val int) *ListNode

type PQueue

type PQueue []int

func (PQueue) Len

func (q PQueue) Len() int

func (PQueue) Less

func (q PQueue) Less(i, j int) bool

func (*PQueue) Pop

func (q *PQueue) Pop() interface{}

func (*PQueue) Push

func (q *PQueue) Push(x interface{})

func (PQueue) Swap

func (q PQueue) Swap(i, j int)

type Stack

type Stack[T any] struct {
	// contains filtered or unexported fields
}

func NewStack

func NewStack[T any]() *Stack[T]

func (*Stack[T]) IsEmpty

func (s *Stack[T]) IsEmpty() bool

func (*Stack[T]) Length

func (s *Stack[T]) Length() int

func (*Stack[T]) Pop

func (s *Stack[T]) Pop() (val T, ok bool)

func (*Stack[T]) Push

func (s *Stack[T]) Push(val T)

type TreeNode

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

Jump to

Keyboard shortcuts

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