Thales Interview Question

C++ virtual function, traverse tree without recursion