Write a program in C++ to do the following operations on a Binary Search Tree (BST) considering the inputs are a set of strings that represent the name of 12 months of a year (in the order January,...


Write a program in C++ to do the following operations on a

Binary Search Tree (BST) considering the inputs are a set of strings that represent the name of 12 months of a year (in the order January, February,. . ., December).

i) Create a BST and add one by one string where each string represents the name of a month.

ii) Print the inorder, pre-order, and post-order traversal of the BST.

iii) Print the minimum and maximum value strings among all the strings after the creation of the entire BST. Here, minimum and maximum values decided based on the alphabetical order of the strings.

(For, example: Among January, February and March, ‘February is minimum

value of the string and ‘March’ is the maximum value of string.)


Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here