4. f40-2.5 marks: Remove a Task from the BST
. File: TaskBST.java
• Method to Complete: remove(int priority)
• Task: Implement the logic to remove a task from the BST based on its priority. You
must correctly handle all three cases for deletion: a node with no children, one child,
or two children. You can use as many helper functions as you want.
Expected example output:
---Initial State ---
--- Task BST --
(T05, Write Documentation, P:4)
(T02, Update UI, P:5)
(T04, Test_New_Feature, P:7)
(T03, Fix Login_Bug, P:8)
(T06, Refactor_Database, P:9)
(T01, Deploy_Server, P:10)
>>> Testing f4: Removing task with priority 4...
--- Final State --
--- Task BST ---
(T02, Update UI, P:5)
(T04, Test_New_Feature, P:7)
(T03, Fix Login_Bug, P:8)
(T06, Refactor_Database, P:9)
(T01, Deploy_Server, P:10)
Zoom
- FUO
+ 100%
Close