21: Added path function to TreeNode (#22)

Path refers to the sequence of nodes along the edges of a tree.
This commit is contained in:
2023-02-22 14:29:22 +01:00
committed by GitHub
parent 8a4e677ebf
commit 4aacbc9dbc
10 changed files with 79 additions and 7 deletions

View File

@@ -0,0 +1,14 @@
import com.github.adriankuta.datastructure.tree.tree
val root =
tree("World") {
child("North America") {
child("USA")
}
child("Europe") {
child("Poland")
child("Germany")
}
}
print(root.prettyString())