Suppose you had the following code: public static <E> void reverse(Stack<E> stack) Queue E> queue-new LinkedListo) 7 TODO (2 points) Fill in this method such that that when it returns, the order of the items in the stack is reversed. Do not allocate any new structures (like an array or list); use only the defined queue and stack, so that once the list terminates, the stack is reversed. Show transcribed image text Suppose you had the following code:
OR
OR