Write an algorithm that sets bottom equal to the last element in the stack, leaving the stack empty.

Given the below example, complete the following activities in a Word document. Include a brief discussion  on each activity. Example: Write an algorithm that sets bottom equal to the last element in the stack, leaving the stack empty. Answer: WHILE (NOT IsEmpty(myStack)) Pop(myStack, bottom) Write an algorithm that sets bottom equal to the last element in the stack, leaving the stack unchanged. Write an algorithm to create a copy of myStack, leaving myStack unchanged. Write an algorithm that sets last equal to the last element in a queue, leaving the queue empty.