Using the methods outlined in the “Benefits of LinkedLists” section, fill both a LinkedList and an ArrayList with 10,000 elements. Then, find the time it takes to access the last element of each list. Determine which type of list can access elements more efficiently. Hint: You can use the get(int position) method to access the element at a given position of a list.
Create a LinkedList of Strings, and ask the user to input 10 names one by one into the list. Names.java
Write a method which takes in a LinkedList of Strings and rearranges the elements (without creating a new list) so it is sorted in ascending order of String length. Don’t use any pre-existing sort methods… write your own. :)
Implement a simple LinkedList
You will need to create a LinkedListNode class, which represents each item/node in the linked list: