problem 1) Create the binary search tree and execute
• Preorder traversal (recursive and non recursive)
• Inorder traversal (recursive and non recursive)
• Postorder traversal (recursive and non recursive)
problem 2) prepare a program to count the number of leaf nodes in a binary tree.
problem 3) prepare a program to list the list the data fields of a binary tree level by level. Within levels, nodes are to be listed from left to right.
problem 4) prepare a program to compute the height of a binary tree.
problem 5) prepare a program to check that two binary trees are similar.
problem 6) Construct two binary trees so that their preorder traversal sequences are the same.
problem 7) Construct two binary trees so that their postorder traversal sequences are the same.
problem 8) prepare a function to swap a binary tree.
problem 9) prepare a function to find out the maximum number of nodes in any level of a binary tree. The maximum number of nodes in any level of a binary tree is also called the width of the tree
problem 10) prepare a function to find out the inorder successor of a given node in a binary tree. The inputs to the function are a pointer to the root of the tree and a pointer to a node. The function returns a pointer to the inorder successor of the given node.
problem 11) prepare a function to find out the inorder predecessor of a given node in a binary tree. The inputs to the function are a pointer to the root of the tree and a pointer to a node. The function returns a pointer to the inorder predecessor of the given node.
problem 12) prepare a function to find out the internal path length of a binary tree.
problem 13) prepare a function to find out the external path length of a binary tree.
problem 14) prepare the function to delete a node from binary search tree which ultimately deletes the inorder predecessor of the node to be deleted if the node has exactly two non empty children.
problem 15) prepare a function to check whether given binary search tree is an AVL tree or not.