Microsoft interview question

Use two methods to implement tree traversal