hello
i want to write an inorder function that takes all the nodes from the bst and stores them in an array (given as parameter to function) but i want to do it using recursion.
it works with the following code but it works only once because of the static pointer temp.the second time temp keeps the value stored before.
1)can i use a static variable or a variable that acts like static in order to set the temp to arr every time i call the function but when it call itself it can keep the previous value.
thanks
yes it works.are there any tricks about recursion i should know because i spent hours yesterday and all i got was the code with the static.and yet you did it in 2 minutes.whats the secret?