I am trying to write a method: which does the following :
1. traverse the BST looking for a certain element of type T .
2. if found its value get changed with another one.
3. if not, even after completing all the traversal, we add the element to the place we stopped in :
So this is the code I have :
The basic question : is that am not very sure about the recursive call that comes under the second and the third if statments.
Does it really add the element in the specified location.