subject

for this lab assignment, you are required to implement the methods specified in the mytree. txt file:

1. create a java file named mytree. java
2. copy the entire code in the mytree. txt and paste to your mytree. java
3. implement the required methods:

public void delete(int data){// implement this method

}
public int height(){ //imjplement this method

}

public mytree balance(){ //implement this method

}
4. once completed, use the treedriver. class to test your implementations. if you implemented all methods properly, the output should look like:

treedriver. class: results
height= 3
300
85
22
10
6

after deleting 300:

height= 2
85
22
10
6

test balancing method

tree before balancing:

9
8
7
6
5
4
3
2
1
after balancing:

9
8
7
6
5
4
3
2
1

tree before balancing:

9
8
6
5
4
3
2
1
0
after balancing:

9
8
6
5
4
3
2
1
0

tree before balancing:

98
78
56
45
9
9
1
0
after balancing:

98
78
56
45
9
9
1
0

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:50
Consider a slotted aloha system, where the time slot equals the fixed duration of each packet. assume that there are 4 stations a,b,c,d sharing the medium. (a) stations a,b,c,d receive one packet each from higher layers at times 1.3, 1.5, 2.6,5.7 respectively. show which transmissions take place when, according to the slottedaloha protocol; describe all transmissions until all four packets have been successful.when needed, each station has access to the following sequence of random number, provided by a random number generator and drawn uniformly between 0 and 1: (1) station a draws numbers: 0.31, 0.27, 0.78, 0.9, 0.9, 0.11, 0. (2) station b draws numbers: 0.45, 0.28, 0.11, 0.83, 0.37, 0.22, 0. (3)station c draws numbers: 0.1, 0.2, 0.3, 0.4, 0. (4) station d draws numbers: 0.36, 0.77, 0.9, 0.1, 0.1, 0.1, 0.1, 0. (b) in slotted aloha, a station transmits in each time slot with a given probability. what probabilities would you assign to each of the four stations so as to: (i) maximize the efficiency of the protocol? (ii) maximize fairness among the four stations? (c) will the efficiency increase or decrease if we modify slotted aloha as follows: (i) get rid of slots and allow stations to transmit immediately? (ii) implement carrier sensing? (iii) implement collision detection? (iv) implement collision avoidance?
Answers: 3
question
Computers and Technology, 24.06.2019 03:30
Which explains extrinsic motivation? a)motivation in which there is a reward b)motivation that is personally satisfying c)motivation that is personally meaningful d)motivation in which the subject is interesting
Answers: 1
question
Computers and Technology, 24.06.2019 06:50
What are the things you are considering before uploading photos on social media?
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
Which of the following is not a “fatal four” event?
Answers: 2
You know the right answer?
for this lab assignment, you are required to implement the methods specified in the mytree. txt file...
Questions
question
English, 12.02.2021 21:50
question
Physics, 12.02.2021 21:50
question
Chemistry, 12.02.2021 21:50
question
Chemistry, 12.02.2021 21:50
Questions on the website: 13722360