/// <summary>
        /// make an inorder traversal and compile the infix expression
        /// </summary>
        /// <param name="result"></param>
        /// <param name="currentNode"></param>
        /// <returns></returns>
        private List <T> VisitInOrder(List <T> result, ExpressionTreeNode <T> currentNode)
        {
            if (currentNode == null)
            {
                return(result);
            }

            VisitInOrder(result, currentNode.Left);
            result.Add(currentNode.Value);
            VisitInOrder(result, currentNode.Right);

            return(result);
        }
        /// <summary>
        /// construct tree for given expression with given operators
        /// </summary>
        /// <param name="expression"></param>
        /// <param name="operators"></param>
        public void Construct(T[] expression, T[] operators)
        {
            expStack = new Stack <ExpressionTreeNode <T> >();

            for (int i = 0; i < expression.Length; i++)
            {
                var newNode = new ExpressionTreeNode <T>(expression[i]);

                if (Contains(operators, expression[i]))
                {
                    var right = expStack.Pop();
                    var left  = expStack.Pop();

                    newNode.Left  = left;
                    newNode.Right = right;
                }

                expStack.Push(newNode);
            }
        }