Question: Compare operations for Javas ArrayList and LinkedList. Measure times while doing multiple read, write and delete operations. Compare with 100,500 and 1000 operations. Submit code

Compare operations for Javas ArrayList and LinkedList. Measure times while doing multiple read, write and delete operations. Compare with 100,500 and 1000 operations. Submit code and your results in codes comments. 2. Create a list structure where you can add elements to the beginning of list and to the end of list and get element from spesific location. Write your implementation based on either ArrayList or LinkedList. You are not allowed to use Javas List structures. List is empty in the beginning. When you add elements, they are indexed from 0,1,2,3,4 Create class OwnList with methods: void addToBeginning(int x ) // adds x to the beginning void addToEnd(int x ) // adds x to end int getElement(int k) // fetches element from index k void wedge(int index, int x ) // Add element to spesific index and increments other elements indexes 3. See LinkedIn Learning video of doubly linked list and implement insertion sort to it. 4. Implement following functionality to singleLinkedList or your arraylist made in task 2. You have a linked list that contains n integers in its nodes values. Iterate through linked list removing consecutive nodes where integers has the same number. If there are multiple ways to remove nodes, remove the leftiest node. How many nodes will remain? [1,2,2,3,3,1]>[1,3,3,1]>[1,1]>[] returns 0 [1,2,3,4,5,6] returns 6 [1,2,3,2,2,1]>[1,2,3,1] returns 4 [1,2,2,2,3,1]>[1,2,3,1] returns 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
