Question: Please Write in C++ Construct Binary Search Tree by Array Executive Summary: A binary search tree is a binary tree in which every node satisfies
Please Write in C++


Construct Binary Search Tree by Array Executive Summary: A binary search tree is a binary tree in which every node satisfies the following: the key of every node in the left subtree is smaller than the key of this node e the key of every node in the right subtree is larger than the key of this node It is possible to construct BST with pointers. A single dimension array is also good enough to construct a BST. One example is like following: 5 index 3) (8 5 3814-1 9 Staring with array index 1 For any node, to find its parent's index: If the node's index is even number -- index/2 If the node's index is odd number (index-1)/2 For any node, to find its left side child's index - index *2 For any node, to find its right side child's index -- index*2+ 1 Project Objective: in completing this project, you will Understand the details of BST, including search, insert, delete, find max, find min Familiar with the links between array and BST
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
