algo

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComplexListNode

type ComplexListNode struct {
	Val     int
	Next    *ComplexListNode
	Sibling *ComplexListNode
}

type DoublyTreeNode

type DoublyTreeNode struct {
	Data       Object
	Father     *DoublyTreeNode
	LeftChild  *DoublyTreeNode
	RightChild *DoublyTreeNode
}

双向树

func NewDoublyTreeNode

func NewDoublyTreeNode(data Object) *DoublyTreeNode

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

type Object

type Object interface{}

type Stack

type Stack struct {
	// contains filtered or unexported fields
}

基于container/list(链表)实现栈

func NewStack

func NewStack() *Stack

func (*Stack) Empty

func (s *Stack) Empty() bool

func (*Stack) Len

func (s *Stack) Len() int

func (*Stack) Peak

func (s *Stack) Peak() interface{}

func (*Stack) Pop

func (s *Stack) Pop() interface{}

func (*Stack) Push

func (s *Stack) Push(val interface{})

type TreeNode

type TreeNode struct {
	Data       Object
	LeftChild  *TreeNode
	RightChild *TreeNode
}

func NewTreeNode

func NewTreeNode() *TreeNode

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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