BinarySearchTree (Part 2)
$30-5000 USD
货到付款
(This is the rest of the project)...In other words, the algorithm for where to place this element will be as easy as comparing the value of the new element with the value of the root. If the new element's value is greater than or equal to the root's value, move to the right subtree and check that element. If the new element's value is less than the root's value, move to the left subtree and check that element. In any case, you are always going to add the element as a leaf in the tree. This is the naïve way because it is possible that you end up with a tree that is just a list of nodes (no nodes in one of the two subtrees). Of course, this is not ideal. Part 3 - BalancedBinarySearchTree - This class will extend the BinarySearchTree class of Part 1. Please put this class in the cs312 package, and make the class public. We will call this class "balanced" because when you add an element to this class, the binary search tree will remain as close to balanced as possible. That means that we are going to have AT MOST one more element in either of the two subtrees than in the other subtree. The algorithm for keeping a tree balanced does not come without a cost, and the cost is in adding the element to the tree. When an element is added to the tree, if the tree is no longer balanced, the elements must be moved to maintain the balanced property. Create a test class to make sure that all of your implementations are working properly. I will have my own test cases, so do not worry about submitting your test cases.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased.
## Platform
Windows NT 2000 Jbuilder Enterprise
## Deadline information
You must view BinarySearchTree (Part 1) on the bid requests to see the first part of this project. Please submit a bid for the entire project, not for both bid requests. I had to put the rest here because I ran out of allowed space on BinarySearchTree (Part 1). Also, please include a comment that you understand the bid is for the whole project.
项目ID: #2900982