Hi everybody! it's really awesome to come back after a good while of learning C.

I have interfaced a problem in binary search tree, I've two keys given and want to search if any of two keys(OR) is presented in the binary search tree or not. what confusing me that I need to solve the problem in an optimal way, meaning I need the "time complexity/space" is much as lower as possible.

I can make an iterative way to search in binary search tree, and calls "twice to the function search for doing search", but is there any possible way for instance to search on the tree once and not twice for finding if one of two keys are presented or not?! thanks !!
just a note, every node in the binary search tree has field of one "data" ! it's like
Code:
struct node{
                                        int data;
                                        struct node* left, *right};

thanks in advance !