private int n, top, bottom;
private int[] Elements = new int[1];
Array.Resize(ref this.Elements, n);
{ if (this.top <= this.bottom) return true;
{ this.Elements[++bottom] = x; }
{ return Elements[top++]; }
{ return Elements[top]; }
{ return Elements[bottom - top + 1]; }