Practice assignments Problem 1 [Binary tree creation from traversal sequences]: Write codes for the following: Given two input sequences of length n -- the inorder traversal sequence S1 and the preorder traversal sequence S2, generate the binary tree T whose inorder and preorder traversal sequences would be S1 and S2. ===================================================================== Problem 2 [Level order traversal]: Write a program in C that performs level order traversal on a binary tree implemented using linked structures. Use a queue to implement the level order traversal. ====================================================================== Problem 3 [finding the height of a binary tree]: Write code for the following problem: Given just a pointer to the root of a binary tree, find the height of the tree. ======================================================================= Problem 4 [Balanced tree creation]: Write code for the following problem: Given a set S of real numbers (a) find the median s of S; (b) Store s as the root and divide S into two halves S1 and S2; S1 contains the numbers less than or equal to s and S2 contains the numbers greater than s. (c) Create the left subtree of s from S1 and right subtree of s from S2 in the same recursive way as mentioned in (a)-(b). ========================================================================