Example #1
0
 public ThreePointerTreeNode(int value, ThreePointerTreeNode left,
     ThreePointerTreeNode right, ThreePointerTreeNode parent)
 {
     this.value = value;
     this.left = left;
     this.right = right;
     this.parent = parent;
 }
Example #2
0
        /* To determine when to print a node’s value, we would have to determine when it’s returned from.
         * If it’s returned from
         * its left child, then you would print its value then traverse to its right child, on the other
         * hand if it’s returned from
         * its right child, you would traverse up one level to its parent.
         */
        public static void Inorder_iterative_NO_STACK(ThreePointerTreeNode root)
        {
            if (root == null) return;
            ThreePointerTreeNode current = root;
            while (true)
            {

            }
        }