Tintash interview question

Write the code for pre-order traversal of binary search tree.