toggle menu
KAHelpers
androidJvm
switch theme
search in API
dataStructuresAndAlgorithms
/
dev.funkymuse.datastructuresandalgorithms.trees.binary
/
BinaryNode
Binary
Node
class
BinaryNode
<
T
>
(
val
value
:
T
)
Members
Constructors
Binary
Node
Link copied to clipboard
constructor
(
value
:
T
)
Properties
left
Child
Link copied to clipboard
var
leftChild
:
BinaryNode
<
T
>
?
right
Child
Link copied to clipboard
var
rightChild
:
BinaryNode
<
T
>
?
value
Link copied to clipboard
val
value
:
T
Functions
deserialize
Link copied to clipboard
fun
deserialize
(
list
:
MutableList
<
T
?
>
)
:
BinaryNode
<
T
?
>
?
deserialize
Optimized
Link copied to clipboard
fun
deserializeOptimized
(
list
:
MutableList
<
T
?
>
)
:
BinaryNode
<
T
?
>
?
height
Link copied to clipboard
fun
height
(
node
:
BinaryNode
<
T
>
?
=
this
)
:
Int
serialize
Link copied to clipboard
fun
serialize
(
node
:
BinaryNode
<
T
>
=
this
)
:
MutableList
<
T
?
>
to
String
Link copied to clipboard
open
override
fun
toString
(
)
:
String
traverse
In
Order
Link copied to clipboard
fun
traverseInOrder
(
visit
:
Visitor
<
T
>
)
traverse
Post
Order
Link copied to clipboard
fun
traversePostOrder
(
visit
:
Visitor
<
T
>
)
traverse
Pre
Order
Link copied to clipboard
fun
traversePreOrder
(
visit
:
Visitor
<
T
>
)
traverse
Pre
Order
With
Null
Link copied to clipboard
fun
traversePreOrderWithNull
(
visit
:
(
T
?
)
->
Unit
)