recursive and non-recursive traversal of binary tree