Question: need this method done please!! Java T pop() throws EmptyStackException 0 Removes and returns the data item at the top of the stack. An EmptyStackException
T pop() throws EmptyStackException 0 Removes and returns the data item at the top of the stack. An EmptyStackException is thrown if the stack is empty. If after removing a data item from the stack the number of data items remaining is smaller than one fourth of the length of the array you need to shrink the size of the array by one half, to a minimum of 14; o To do this create a new array of size equal to half of the size (to a minimum of 14) of the original array and copy the data items there. o For example, if the stack is stored in an array of size 100 and it contains 25 data items, after performing a pop operation the stack will contain only 24 data items. Since 24
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
