public static void Main()
Console.Write("Popped element from stack1 is " + ts.pop() +"\n");
Console.Write("Popped element from stack1 is " + ts.pop());
Console.WriteLine(ts.IsFull(ts));
public void printNGE(int[] inputarray, Stack tt)
for(int i=1; i<= inputarray.Length-1; i++)
Console.WriteLine(element + "-----" + " " + next);
Console.WriteLine(element + "-----" + " " + next);
public bool IsEmpty(Stack tt)
return (tt.top == -1)? true:false;
public bool IsFull(Stack tt)
Console.WriteLine(tt.top);
return (tt.top == tt.size)? true:false;
Console.WriteLine("underflow");
public int peek(Stack tt)