public static void Test() { StackImplByQueue stack = new StackImplByQueue(); for (int i = 0; i < 10; i++) { stack.Push(i); Console.WriteLine("Push({0})", i); if ((i & 1) == 0) { Console.WriteLine("Pop() = " + stack.Pop()); } } }
public static void Test() { StackImplByQueue stack = new StackImplByQueue(); for (int i = 0; i < 10; i++) { stack.Push(i); Console.WriteLine("Push({0})", i); if ((i & 1) == 0) Console.WriteLine("Pop() = " + stack.Pop()); } }