Create a binary search tree

99 views 8:25 am 0 Comments August 5, 2023

Problem Statement: Write a program which should create a binary search tree of the values entered by the user and then write functions that perform following functionalities. Traversal: 1. Inorder 2. Preorder 3. Postorder 4. Level order (Breadth first search) Functions that find the following: For every algorithm, root node is given as input along with any other input (if mentioned). 1. To find and return parent of given node? 2. To find and return depth/level of given node? 3. To find and return height of tree? 4. To find if two nodes are at same level of tree or not? 5. To find and return total number of nodes? Your assignment should contain followings.  Title page  Problem statement  Code  Screen shots for each option/functionality Submission Date: 23-4-2021 Problem Statement: Write a program which should create a binary search tree of the values entered by the user and then write functions that perform following functionalities. Traversal: 1. Inorder 2. Preorder 3. Postorder 4. Level order (Breadth first search) Functions that find the following: For every algorithm, root node is given as input along with any other input (if mentioned). 1. To find and return parent of given node? 2. To find and return depth/level of given node? 3. To find and return height of tree? 4. To find if two nodes are at same level of tree or not? 5. To find and return total number of nodes? Your assignment should contain followings. ✓ Title page ✓ Problem statement ✓ Code ✓ Screen shots for each option/functionality

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,