Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Tree is iterated by using `Level-order Traversal Algorithm" In level-order traversal we iterating nodes level by level, starting from root, and going deeper and deeper in tree.

Link copied to clipboard

Tree is iterated by using `Post-order Traversal Algorithm" In post-order traversal, we starting from most left child. First visit all children of parent, then parent.

Link copied to clipboard

Tree is iterated by using `Pre-order Traversal Algorithm" The pre-order traversal is a topologically sorted one, because a parent node is processed before any of its child nodes is done.

Link copied to clipboard
open class TreeNode<T>(val value: T) : Iterable<TreeNode<T>> , ChildDeclarationInterface<T>

Original library: https://github.com/AdrianKuta/Tree-Data-Structure

Link copied to clipboard
class TreeNodeException @JvmOverloads constructor(message: String? = null, cause: Throwable? = null) : RuntimeException
Link copied to clipboard

Functions

Link copied to clipboard
inline fun <T> tree(root: T, defaultIterator: TreeNodeIterators = TreeNodeIterators.PreOrder, childDeclaration: ChildDeclaration<T>): TreeNode<T>

This method can be used to initialize new tree.