function countChildren(node)
i=0
m=0
node = LMCHILD(node)
while (w is not nil)
m = max{countChildren(node), m};
w = RMSIB(w);
i++;
return max{i,m}
I have this so far, but I am tracing it and it doesnt work and I dont understand why. How can I make this recursive if i and m both get reset to 0 every time a recursive call is made