Binary Tree Traversal

Medium
Problem Statement

Traverse a binary tree using different strategies: inorder, preorder, and postorder.

Constraints

  • Recursive implementation
  • Time Complexity: O(N)
  • Space Complexity: O(H)
  • N = number of nodes, H = height of tree
Solution