array based stack and queue