fig circular list bidirectional list is list of elements that are linked in both ways (see fig both links are originating from header analogous to the preceding exerciseconstruct module with procedures for searchinginsertingand deleting elements fig bidirectional list does the given program for topological sorting work correctly if certain pair occurs more than once in the input the message "this set is not partially orderedin the program for topological sorting is not very helpful in many cases extend the program so that it outputs sequence of elements that form loopif there exists one write program that reads program textidentifies all procedure definitions and callsand tries to establish topological ordering among the subroutines let mean that is called by draw the tree constructed by the program shown for constructing the perfectly balanced treeif the input consists of the natural numbers which are the sequences of nodes encountered when traversing the tree of fig in preorderinorderand postorder find composition rule for the sequence of numbers whichif applied to the program for straight search and insertionyields perfectly balanced tree consider the following two orders for traversing binary treesa traverse the right subtree visit the root traverse the left subtree visit the root traverse the right subtree traverse the left subtree are there any simple relationships between the sequences of nodes encountered following these orders and those generated by the three orders defined in the text define data structure to represent -ary trees then write procedure that traverses the -ary tree and generates binary tree containing the same elements assume that the key stored in an element