types

package
v0.0.0-...-cfba871 Latest Latest
Warning

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

Go to latest
Published: May 8, 2021 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 Comparable

type Comparable interface {
	CompareTo(o T) int
}

type Comparator

type Comparator func(left, right T) int

Comparator is a BiFunction, which two input arguments are the type, and returns a int. if t1 is greater then t2, it returns a positive number; if t1 is less then t2, it returns a negative number; if the two input are equal, it returns 0

type Integer

type Integer int

func (Integer) CompareTo

func (i Integer) CompareTo(o T) int

type K

type K Comparable

K indicates a type can be compared

type ListNode

type ListNode struct {
	Value T
	Next  *ListNode
}

type R

type R interface{}

R indicates any type

type T

type T interface{}

T indicates any type

type TreeNode

type TreeNode struct {
	Value  T
	Parent *TreeNode
	Left   *TreeNode
	Right  *TreeNode
}

type U

type U interface{}

U indicates any type

type V

type V interface{}

V indicates any type

Jump to

Keyboard shortcuts

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