Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

size of a tree node java linked;ist

 int size(Node node)
    {
        if (node == null)
            return 0;
        else
            return(size(node.left) + 1 + size(node.right));
    }
 
PREVIOUS NEXT
Tagged: #size #tree #node #java
ADD COMMENT
Topic
Name
5+7 =