/// <summary>
        /// Helper method
        /// </summary>
        private void AlternateNodes()
        {
            int   depth     = Count;
            bool  even      = Count % 2 == 0;
            Stack tempStack = new Stack();

            for (int i = 0; i < depth; i++)
            {
                if (even)
                {
                    tempStack.Push(StackTwo.Pop());
                }
                else
                {
                    tempStack.Push(StackOne.Pop());
                }
            }
            for (int j = 0; j < depth; j++)
            {
                if (even)
                {
                    StackOne.Push(tempStack.Pop());
                }
                else
                {
                    StackTwo.Push(tempStack.Pop());
                }
            }
        }
 /// <summary>
 /// Method finds the beginning of the "Queue" or
 /// bottom of StackOne
 /// </summary>
 /// <returns></returns>
 public Node Peek()
 {
     while (StackOne.Peek() != null)
     {
         StackTwo.Push(StackOne.Pop());
     }
     Front = StackTwo.Top;
     while (StackTwo.Peek() != null)
     {
         StackOne.Push(StackTwo.Pop());
     }
     return(Front);
 }
 /// <summary>
 /// Dequeues a node from the queue and returns its value.
 /// </summary>
 /// <returns>
 /// string: the string value of the dequeued Node
 /// </returns>
 public string Dequeue()
 {
     try
     {
         string returnValue = StackOneLastPopped ? StackTwo.Pop() : StackOne.Pop();
         StackOneLastPopped = !StackOneLastPopped;
         Count--;
         return(returnValue);
     }
     catch (NullReferenceException e)
     {
         throw e;
     }
 }
        /// <summary>
        /// Enqueue method
        /// </summary>
        /// <param name="value">The value of which we are trying to "enqueue"</param>
        public void Enqueue(string value)
        {
            AlternateNodes();

            if (Count % 2 != 0)
            {
                StackOne.Push(value);
            }
            else
            {
                StackTwo.Push(value);
            }
            Count++;
        }
        /// <summary>
        /// Method uses the Stack Push and Pop methods to emulate FIFO.
        /// It will move all values from StackOne to StackTwo, pop and store the top
        /// from StackTwo and then proceed to re-fill StackOne to ensure Queue-Like
        /// Order
        /// </summary>
        /// <returns>Node that is removed</returns>
        public Node Dequeue()
        {
            while (StackOne.Peek() != null)
            {
                StackTwo.Push(StackOne.Pop());
            }
            Node popped = StackTwo.Pop();

            Front = StackTwo.Top;
            while (StackTwo.Peek() != null)
            {
                StackOne.Push(StackTwo.Pop());
            }
            return(popped);
        }
 /// <summary>
 /// Dequeue method
 /// </summary>
 /// <returns>string of returned node</returns>
 public string Dequeue()
 {
     try
     {
         if (Count % 2 == 0)
         {
             return(StackOne.Pop());
         }
         else
         {
             return(StackTwo.Pop());
         }
     }
     catch (NullReferenceException e)
     {
         throw new Exception("");
     }
 }
 /// <summary>
 /// Method uses the Stack method Push to emulate adding to the
 /// back of a queue
 /// </summary>
 /// <param name="node">New node to be added</param>
 public void Enqueue(Node node)
 {
     StackOne.Push(node);
 }