Sunday, December 27, 2009

Minimum of Binary Sub Tree

public Node getMinOfSubTree(Node n)
        {
            if (n.Left == null && n.Right == null) return n;
            Node t = n;
            while (t.Left != null)
            {
                t = t.Left;
            }
            return t;
        }

No comments:

Node.JS rest api Tutorials