kotlin-mpp-playground
Toggle table of contents
0.1.0.0+dc7cae6
common
Platform filter
common
Switch theme
Search in API
kotlin-mpp-playground
shared
/
dev.suresh.lc
/
Node
Node
data
class
Node
<
out
T
>
(
val
value
:
T
,
val
left
:
Tree
<
T
>
=
Empty
,
val
right
:
Tree
<
T
>
=
Empty
)
:
Tree
<
T
>
(
source
)
Members
Members & Extensions
Constructors
Node
Link copied to clipboard
constructor
(
value
:
T
,
left
:
Tree
<
T
>
=
Empty
,
right
:
Tree
<
T
>
=
Empty
)
Properties
left
Link copied to clipboard
val
left
:
Tree
<
T
>
right
Link copied to clipboard
val
right
:
Tree
<
T
>
value
Link copied to clipboard
val
value
:
T
Functions
bfs
Link copied to clipboard
fun
<
T
>
Tree
<
T
>
.
bfs
(
)
:
List
<
T
>
depth
Link copied to clipboard
fun
<
T
>
Tree
<
T
>
.
depth
(
)
:
Int
dfs
Link copied to clipboard
fun
<
T
>
Tree
<
T
>
.
dfs
(
order
:
Order
=
IN
)
:
List
<
T
>
dfs
To
Link copied to clipboard
fun
<
T
>
Tree
<
T
>
.
dfsTo
(
order
:
Order
=
IN
,
dest
:
MutableList
<
T
>
)
print
Link copied to clipboard
fun
<
T
>
Tree
<
T
>
.
print
(
)
sum
Link copied to clipboard
fun
<
T
:
Number
>
Tree
<
T
>
.
sum
(
)
:
Long