Imagine several stack operations on an array-based stack. Suppose that the array doubles in size, but later fewer than half of the array's locations are actually used by the stack. Describe an implementation that halves the size of the array in this case. What are the advantages and disadvantages of such an implementation?