What is the expected big-o running time if an arraylist is


Question: Suppose a Java method receives a List and reverses the order of the items it contains by removing each item from the front of the list, adding each item to a Stack, and then removing the items from the stack and inserting each item to the end of the list.

Q: What is the expected Big-O running time if:

Part 1: If an ArrayList is passed. Explain your answer.

Part 2: If a LinkedList is passed. Explain your answer.

This one is hard and I don't know how answer it. Can anybody answer the expected Big-O running time.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: What is the expected big-o running time if an arraylist is
Reference No:- TGS0949732

Expected delivery within 24 Hours