A.top++;s[top]=x; B.s[top]=x;top++; C.top--;s[top]=x; D.s[top]=x;top--;
A.O(n) B.O(√n) C.O(nlog2n) D.O(n2)
A.O(n) B.O(nlog2n) C.O(n2) D.O(√n)