Ejemplo n.º 1
0
 /// <summary>
 /// Deletes all nodes from tree
 /// </summary>
 public void Clear()
 {
     BinaryTreeRecursiveHelper <T> .TraversalPostOrder(Root, node =>
     {
         Delete(node.Value);
     });
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Visits all tree nodes in post order and performs specified action for each node
 /// </summary>
 /// <param name="action">Action to perform</param>
 public void TraversalPostOrder(Action <BinaryTreeNode <T> > action)
 {
     BinaryTreeRecursiveHelper <T> .TraversalPostOrder(Root, action);
 }