i need to write a recursive function which finds the smallest number in a tree which is bigger

then the given number

??

Printable View

- 08-04-2009cfanwhat is the algorithm in this problem..
i need to write a recursive function which finds the smallest number in a tree which is bigger

then the given number

?? - 08-04-2009whiteflags
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.

- 08-04-2009KBriggs
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.