Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with the following Description 1. Using the remove (self, currentNode) method in the BinarySearchTree class (found in bst.py), do the following. a.

Please help me with the following

image text in transcribed
Description 1. Using the remove (self, currentNode) method in the BinarySearchTree class (found in bst.py), do the following. a. For each execution path through the remove method, draw a BST that would result in the code in the execution path being executed. When you are done with this problem, you should have drawn nine different BST5. (5 points for each drawing) i. You may choose to hand-draw each picture, then insert photos into a Word document. In this case, be sure your hand-writing is legible. ii. You may choose to use drawing tools within MS Word. In this case, be sure it is easy to determine left versus right child in each binary tree. 2. Using the buildHeap (self, alist) and delMin (self) methods in the BinHeap class (found in BinHeap.py provided to you), write a sort function that can sort a list in O(n log n) time. Be sure to thoroughly test your solution using lists containing integer values. (40 points) 3. Explain why your solution for problem 2 exhibits Oln log n) performance. Write your explanation at the top of your source code file as comments. (15 points) 4. Submit a Word document (for problem 1) and a Python source code file (for problems 2 and 3)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

How can

Answered: 1 week ago