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
Package-level
declarations
Types
Functions
Types
Empty
Link copied to clipboard
data
object
Empty
:
Tree
<
Nothing
>
Node
Link copied to clipboard
data
class
Node
<
out
T
>
(
val
value
:
T
,
val
left
:
Tree
<
T
>
=
Empty
,
val
right
:
Tree
<
T
>
=
Empty
)
:
Tree
<
T
>
Order
Link copied to clipboard
enum
Order
:
Enum
<
Order
>
Tree
Link copied to clipboard
sealed
interface
Tree
<
out
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
>
)
main
Link copied to clipboard
fun
main
(
)
print
Link copied to clipboard
fun
<
T
>
Tree
<
T
>
.
print
(
)
sum
Link copied to clipboard
fun
<
T
:
Number
>
Tree
<
T
>
.
sum
(
)
:
Long