Simple implementation of a stack using an array.  From Algorithms 4th Ed. Section 1.3