コード例 #1
0
        static void Main(string[] args)
        {
            CircularList one = new CircularList();

            one.insert(1);
            one.insert(2);
            one.insert(3);
            one.insert(4);
            one.insert(5);
            one.display();

            one.remove();
            one.display();

            one.Find(4);

            Console.WriteLine("Stack: ");

            Stack stack1 = new Stack();

            stack1.push(1);
            stack1.push(2);
            stack1.push(3);
            stack1.push(4);
            stack1.push(5);
            stack1.display();

            stack1.pop();
            stack1.pop();
            stack1.display();
        }
コード例 #2
0
 public Stack()
 {
     theStack = new CircularList();
     size     = 0;
     curr     = 0;
 }