Dear guys,
I have looked closer, I have written this, will you please see if the 3
algorithms make any sense, especially 4.3 - and please help with the
running time? Thanks in advance. I need to hand in tonight before midnight.
Thx
4.1
*a. *
N
P
just check first for the right child of node if (right*[**x**]** ≠* NIL ) and
then first call print method for right child
Algorithm 3 Print(x)
1: if (*x **≠* NIL) then
2: print *colour **[**x**]*
3: if (right*[**x**]** ≠* NIL) then
4: Print (right*[**x**]**)*
5:
assignment is not at all tough , i guess you should understand recursion to
solve these question.
for eg : in question 4.1 : you just need to swap line number 4 and line
number 5 to get the solution.
in question 4.2 , you are given code for counting total number of nodes in
the tree and for counti