Exemple #1
0
        public void EnqeueRange(int[] input)
        {
            foreach (var value in input)
            {
                InStack.Push(value);
            }

            while (InStack.Count > 0)
            {
                OutStack.Push(InStack.Pop());
            }
        }
Exemple #2
0
 public void Enqueue(int value)
 {
     InStack.Push(value);
 }
 public void Enqueue(T value)
 {
     MoveNodes(OutStack, InStack);
     InStack.Push(value);
 }