i need to write a recursive function which finds the smallest number in a tree which is bigger
then the given number
??
This is a discussion on what is the algorithm in this problem.. within the C Programming forums, part of the General Programming Boards category; i need to write a recursive function which finds the smallest number in a tree which is bigger then the ...
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.