chap non-binary trees figure an example of general tree example preorder traversal of the tree in figure visits the nodes in order racdebf postorder traversal of this tree visits the nodes in order cdeaf br to perform preorder traversalit is necessary to visit each of the children for given node (say rfrom left to right this is accomplished by starting at ' leftmost child (call it tfrom twe can move to ' right siblingand then to that node' right siblingand so on using the adt of figure here is java implementation to print the nodes of general tree in preorder note the for loop at the endwhich processes the list of children by beginning with the leftmost childthen repeatedly moving to the next child until calling next returns null /*preorder traversal for general trees *static void preorder(gtnode rtprintnode(rt)if (!rt isleaf()gtnode temp rt leftmostchild()while (temp !nullpreorder(temp)temp temp rightsibling() the parent pointer implementation perhaps the simplest general tree implementation is to store for each node only pointer to that node' parent we will call this the parent pointer implementation