search

package
v0.0.0-...-0216257 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RED   = true
	BLACK = false
)

Variables

This section is empty.

Functions

func BinarySearch

func BinarySearch(sources []int, target int) int

* 二分查找标准

func BinarySearchFirstEquals

func BinarySearchFirstEquals(sources []int, target int) int

* 变体一:查找第一个值等于给定值的元素

Types

type RBNode

type RBNode struct {
	Data   interface{}
	Parent *RBNode
	Left   *RBNode
	Right  *RBNode
	// contains filtered or unexported fields
}

type RBTree

type RBTree struct {
	Root *RBNode
}

Jump to

Keyboard shortcuts

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