Question

Problem Write a class called "Search Tree" that accepts data values and then lets you search the list to see if a value is in the list. The key part of the class is in the data structure that it uses to store the data. At its core, the Search Tree is an unbalanced binary search tree. New values are added to the bottom of the tree. Values should only be stored in the tree once. The important feature to the tree is in the search method. In addition to searching for an item in the tree, we store the number of times that an item has been searched for previously. When find the item, we compare the number of searches for the item with the number of searches for the parent. If the item is searched for more than its parent then we move that item up one level in the tree and the parent goes down a level. We elaborate on this action later in this assignment.