State + Visitor Pattern for the Binary Tree Structure