if there are no other active references to ethen the memory space taken by will be reclaimed by the garbage collector table shows the running times for methods in realization of stack by an array each of the stack methods in the array realization executes constant number of statements involving arithmetic operationscomparisonsand assignments in additionpop also calls isemptywhich itself runs in constant time thusin this implementation of the stack adteach method runs in constant timethat isthey each run in ( time table performance of stack realized by an array the space usage is ( )where is the size of the arraydetermined at the time the stack is instantiated note that the space usage is independent from the number < of elements that are actually in the stack method time size ( is empty ( top ( push ( pop ( concrete java implementation of the pseudo-code of code fragment with java class arraystack implementing the stack interfaceis given in code fragments and unfortunatelydue to space considerationswe omit most