Tree/threaded_binary_tree_traversal library
🌳 Threaded Binary Tree Traversal
Traverses a threaded binary tree efficiently using O(1) space. Threaded binary trees use otherwise null right pointers to point to the inorder successor.
Time complexity: O(n) Space complexity: O(1)
Example:
// See documentation for how to build a threaded tree.
Classes
Functions
-
threadedInorderTraversal<
T> (ThreadedBinaryTreeNode< T> ? root) → List<T>