KPMG interview question

Preorder traversal of binary tree