Pergunta de entrevista da empresa Apple

implement an interator for a binary search tree, that means for every time that the user calls the function next it will return the next element untill it returns NULL if the user iterates throw all the tree.