grandparent and grandchild relations can be defined in similar mannerwe could also extend this terminology further if we wished (designating nodes as cousinsas an uncle or auntetc other tree terms the number of subtrees of node is called the degree of the node in binary treeall nodes have degree or node of degree zero is called terminal node or leaf node non-leaf node is often called branch node the degree of tree is the maximum degree of node in the tree binary tree is degree directed path from node to nk is defined as sequence of nodes nk such that ni is the parent of ni+ for < an undirected path is similar sequence of undirected edges the length of this path is the number of edges on the pathnamely ( the number of nodes there is path of length zero from every node to itself notice that in binary tree there is exactly one path from the root to each node the level or depth of node with respect to tree is defined recursivelythe level of the root is zeroand the level of any other node is one higher than that of its parent or to put it another waythe level or depth of node ni is the length of the unique path from the root to ni the height of ni is the length of the longest path from ni to leaf thus all leaves in the tree are at height the height of tree is equal to the height of the root the depth of tree is equal to the level or depth of the deepest leafthis is always equal to the height of the tree if there is directed path from to then is an ancestor of and is descendant of