File saved. exiting…
$>
Bonus (
1
marks
):
implem
ent a delete
method
that allows the user to delete a node from
the tree.
To delete a node from a 2
-
3 tree is performed analogously. First the node is located and
removed. Call
p
the parent of the removed node. If the number of children of
p
has
decreased
from three to two, the tree is still 2
-
3. If the number of children of
p
has
decreased from two to one, merge
p
with one of its siblings, possibly reducing the
number of children of
p
‘s parent. Precede
recursively
, up to the root of the tree. If at the
end
deleting a root makes its child become root. For more details how delete should work
look at the above java applet link
and the text
-
book
.
Submission
:
Hand in your complete Java source code; and a copy of the results
after running
your program
(
with the given file
Two Three Insert
.txt)
Upload your source code to
CMS
Demonstrate your program to TA before/on the due date
To get answer chat with online assignment adviser
