예제 #1
0
        static void Main(string[] args)
        {
            var s = new StackArray(5);

            s.push(12);
            s.push(11);
            s.push(113);
            s.push(413);
            s.push(4131);
            s.display();
        }
예제 #2
0
        public void Implement_Stack_Using_Array()
        {
            StackArray stack = new StackArray(100, output);

            stack.push(2);
            stack.push(3);

            Assert.Equal(3, stack.pop());
            stack.push(4);
            Assert.Equal(4, stack.pop());
            stack.printStack();
        }