GitHub Viewer
#include
#include
using namespace std;
class twoStacks
{
int *arr;
int size;
int top1, top2;
public:
twoStacks(int n)
{
size = n;
arr = new int[n];
top1 = -1;
top2 = size;
}
void push1(int x)
{
if (top1 < top2 - 1)
{
top1++;
arr[top1] = x;
}
else
{
cout