mirror of
https://github.com/AdrianKuta/Tree-Data-Structure.git
synced 2026-06-19 19:00:14 +02:00
feat: add runnable :samples module (#47)
* build: scaffold :samples module (issue #37) * feat: add runnable, verified examples to :samples (issue #37) * ci,docs: run :samples in CI and document ./gradlew :samples:run (issue #37)
This commit is contained in:
@@ -213,6 +213,15 @@ val bigger = root.addChild(ImmutableTreeNode("Asia")) // root is unchanged; bigg
|
||||
bigger.preOrder().forEach { println(it.value) } // pre/post/level-order, nodeCount(), height()
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
A runnable `:samples` module bundles compile-checked, assertion-verified examples of the core API
|
||||
and the serialization, coroutines, and immutable modules. Run them with:
|
||||
|
||||
```
|
||||
./gradlew :samples:run
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
`TreeNode` is mutable and not thread-safe. Add your own synchronization if you share a tree across
|
||||
|
||||
Reference in New Issue
Block a user