- Please Help Me With This Code Code Should Be In Java Language 1 If A User Wants To Delete Any Word From A Tree Your P 1 (67.94 KiB) Viewed 15 times
Please help me with this code. Code should be in Java Language. 1. If a user wants to delete any word from a tree your p
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Please help me with this code. Code should be in Java Language. 1. If a user wants to delete any word from a tree your p
Please help me with this code. Code should be in Java Language. 1. If a user wants to delete any word from a tree your program should delete that word from the tree and show the new tree after deletion of that word. 2. Use file handling and save elements of tree in a file in pre-order/post-order/in- order and make a function start () which inserts all elements from file to BST as you run the program. For Binary Search Tree follow this: You will be creating a BST using a BST class called BinarySearchTree. Along with implementing the methods you will need to define a BSTNodeclass. BSTNodeswill be used to store an item (the textbook calls these keys) which in this assignment are Strings. It will also contain references to its left and right subtrees (which as also BSTNodes). The BSTNode constructor will initialize the item to a value and the left and right nodes to null. The BinarySearch Treeclass itself only has one field, the root of the BST. The constructor for the BinarySearchTreeonly has to set the root to null. Code should be done in Java Language.