algorithm height for computing the height of the subtree of tree rooted at node code fragment java method height written in algorithm height is more efficient than height (from code fragment the algorithm is recursiveandif it is initially called on the root of tit will eventually be called on each node of thuswe can determine the running time of this method by summingover all the nodesthe amount of time spent at each node (on the nonrecursive partprocessing each node in children(vtakes ( timewhere denotes the number of children of node alsothe while loop has iterations and each iteration of the loop takes ( time plus the time for the recursive call on child of thusalgorithm height spends ( time at each node vand its running time is ( ( )in order to complete the analysiswe make use of the following property proposition let be tree with nodesand let denote the number of children of node of thensumming over the vertices in ts