Search
Preparing search index...
The search index is not available
tstruct
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"BinaryTree/BinarySearchTree"
BinarySearchTree
Class BinarySearchTree<T>
Type parameters
T
Hierarchy
BinaryTree
<
T
>
BinarySearchTree
AVLTree
Implements
IBinaryTree
<
T
>
IBinarySearchTree
<
T
>
Index
Constructors
constructor
Properties
_head
compare
Function
Accessors
head
max
min
Methods
add
delete
find
Node
insert
Node
remove
to
Array
value
Exists
Constructors
constructor
new
Binary
Search
Tree
(
compareFunction
?:
CompareFunctionType
<
T
>
)
:
BinarySearchTree
Parameters
Optional
compareFunction:
CompareFunctionType
<
T
>
Returns
BinarySearchTree
Properties
Protected
_head
_head
:
IBinaryTreeNode
<
T
>
Protected
compare
Function
compare
Function
:
CompareFunctionType
<
T
>
= descendingCompareFunction
Accessors
head
get
head
(
)
:
IBinaryTreeNode
<
T
>
Returns
IBinaryTreeNode
<
T
>
max
get
max
(
)
:
T
Returns
T
min
get
min
(
)
:
T
Returns
T
Methods
add
add
(
value
:
T
, callback
?:
(
node
:
IBinaryTreeNode
<
T
>
)
=>
void
)
:
void
Parameters
value:
T
Default value
callback:
(
node
:
IBinaryTreeNode
<
T
>
)
=>
void
= undefined
(
node
:
IBinaryTreeNode
<
T
>
)
:
void
Parameters
node:
IBinaryTreeNode
<
T
>
Returns
void
Returns
void
delete
delete
(
value
:
T
)
:
void
Parameters
value:
T
Returns
void
find
Node
find
Node
(
value
:
T
, node
?:
IBinaryTreeNode
<
T
>
)
:
IBinaryTreeNode
<
T
>
Parameters
value:
T
Default value
node:
IBinaryTreeNode
<
T
>
= this.head
Returns
IBinaryTreeNode
<
T
>
Protected
insert
Node
insert
Node
(
value
:
T
, node
:
IBinaryTreeNode
<
T
>
)
:
IBinaryTreeNode
<
T
>
Parameters
value:
T
node:
IBinaryTreeNode
<
T
>
Returns
IBinaryTreeNode
<
T
>
remove
remove
(
value
:
T
)
:
void
Parameters
value:
T
Returns
void
to
Array
to
Array
(
)
:
T
[]
Returns
T
[]
value
Exists
value
Exists
(
value
:
T
)
:
boolean
Parameters
value:
T
Returns
boolean
Globals
"
Binary
Tree/AVLTree"
"
Binary
Tree/
Binary
Search
Tree"
"
Binary
Tree/
Binary
Tree"
"
Common/
Common"
"
Compare
Function"
"
Graph/
Graph"
"
Heap/
Heap"
"
Linked
List/
Linked
List"
"
Queue/
Priority
Queue"
"
Queue/
Queue"
"
Sorting
Algorithms/
Sorting
Algorithms"
"
Stack/
Stack"
"
Trie/
Trie"
"
Union
Find/
Union
Find"
Binary
Search
Tree
constructor
_head
compare
Function
head
max
min
add
delete
find
Node
insert
Node
remove
to
Array
value
Exists
IBinary
Search
Tree
Generated using
TypeDoc