public int MaxDepthIterative(BinaryTreeNode root)
        {
            DepthTreeNode rootNode = new DepthTreeNode()
            {
                node  = root,
                depth = 1
            };

            return(MaxDepthIterative(rootNode));
        }
        // Runtime : 176ms
        // Tx = O(n) {n: n is the number of nodes in the binary tree}
        // Sx = O(2*n) for new binarytreenode and stack
        public int MaxDepthIterative(DepthTreeNode root)
        {
            if (root.node == null)
            {
                return(root.depth - 1);
            }

            Stack <DepthTreeNode> depthNodes = new Stack <DepthTreeNode>();

            depthNodes.Push(root);

            int maxDepth = 0;

            while (depthNodes.Count > 0)
            {
                var depthNode = depthNodes.Pop();

                maxDepth = sys.Math.Max(depthNode.depth, maxDepth);

                if (depthNode.node.Left != null)
                {
                    depthNodes.Push(new DepthTreeNode()
                    {
                        node = depthNode.node.Left, depth = depthNode.depth + 1
                    });
                }

                if (depthNode.node.Right != null)
                {
                    depthNodes.Push(new DepthTreeNode()
                    {
                        node = depthNode.node.Right, depth = depthNode.depth + 1
                    });
                }
            }

            return(maxDepth);
        }