i need to write a recursive function which finds the smallest number in a tree which is bigger
then the given number
??
Printable View
i need to write a recursive function which finds the smallest number in a tree which is bigger
then the given number
??
Show some effort. The way you ask questions reminds me of someone else. No one wanted to answer his questions cause he didn't want to write anything himself and take all the credit.
loop over the tree
If the number you are looking at is larger than the number you are comparing too, but smaller than the smallest number you have found so far, store it.
Repeat
That's how you would do it iteratively, now you do the recursion.