Computers and Technology

Binary search trees with lazy deletion implement binary search tree class with lazy deletion that has treenode as nested class in java design the class, treenode to have following class variables int key: // all keys are in the range 1 to 99 treenode leftchild treenode rightchild; boolean deleted your program method must have routines to do the following operations. insert //should insert a new element to a leaf node. if new element is a duplicate then do nothing. if the new element is previously deleted one, then do not add other copy just mark the previous deleted as valid now delete //should not remove the element from the tree. it should just mark the element as deleted findmin //should return the minimum element, but if it is marked deleted return appropriate minimum findmax //should return the maximum element, but if it is marked deleted return appropriate maximum contains //should return true if a particular element is in the tree and is not marked as deleted in order tree traversal //should print the in order traversal of the tree. indicating with symbol for elements that are marked deleted height ( returns the height of the tree) //return the height of the tree, count all the elements even the ones that are marked as deleted no of nodes (returns number of nodes+number of deleted nodes) //print size of the tree, count all the elements even the ones that are marked as deleted, and

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 10:00, karissanichole18
Install and use wireshark program ( send back screen shots and other vital information) case project 3-2: decode a tcp segment in a wireshark capture in this chapter, you walked through tcp segment to interpret the data included in its header. in this project, you use wireshark to capture your own http messafes, examine the tcp headers, and practice interpreting the data you'll find there. 1. open wireshark and snap the window to one side of your screen. open a browser and snap that window to the other side of your screen so you can see both windows.
Answers: 2
image
Computers and Technology, 23.06.2019 16:00, keyonaemanieevans
Helen is having a meeting with her colleagues in her company. they are working on the goals and objectives for the coming year. they want to ensure that these goals and objectives of the processes involved are properly evaluated. which system can helen and her colleagues apply to evaluate this? helen and her colleagues require a blank to evaluate the goals and objectives.
Answers: 2
image
Computers and Technology, 23.06.2019 21:20, nathanfletcher
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
image
Computers and Technology, 25.06.2019 01:00, shonesam98
Regular maintenance is a key component of automotive lift safety.
Answers: 1
Do you know the correct answer?
Binary search trees with lazy deletion implement binary search tree class with lazy deletion that ha...

Questions in other subjects:

Konu
English, 13.04.2020 19:15
Konu
Mathematics, 13.04.2020 19:15