private static void BasicTest(IMinStacks stack, out int min1, out int top, out int min2) { stack.Push(-2); stack.Push(0); stack.Push(-3); min1 = stack.GetMin(); stack.Pop(); top = stack.Top(); min2 = stack.GetMin(); }
private static void TopDonRemoveMin(IMinStacks stack, out int min1, out int top, out int min2) { min1 = stack.GetMin(); stack.Push(2); top = stack.Top(); min2 = stack.GetMin(); }
private static void BenchMark_Cenario(IMinStacks stack, out int min1, out int top, out int min2) { stack.Push(-2); for (int i = 0; i < 1000000; i++) { stack.Push(-2); i++; } stack.Push(0); stack.Push(-3); min1 = stack.GetMin(); stack.Pop(); top = stack.Top(); min2 = stack.GetMin(); }