Question: Project 3 involves implementing list structures in two different data structures: LinkedList and ArrayList. In addition, you will need to implement other operations on both
Project involves implementing list structures in two different data structures: LinkedList and ArrayList. In addition, you will need to implement other operations on both those data structures. You will then compare the time complexities of a select few list methods when implemented as an ArrayList vs a LinkedList in analysis.txt or analysis.pdf either is acceptable
IMPORTANT: Specifications for each method can be found in List.java, which is a Java interface.
The following methods should be implemented in for both ArrayList and LinkedList:
boolean addT element
boolean addint index, T element
void clear
T getint index
int indexOfT element
boolean isEmpty
int size
void sort
T removeint index
void reverse Note: You must reverse the list INPLACE no intermediate data structures
void removeDuplicates
void intersectList otherList
void mergeList list
T getMin
T getMax
String toString
boolean isSorted
Optimizations Points
The following methods need to be optimized in your LinkedList and ArrayList classes. If isSorted is true, then there should be an optimized case for these functions:
int indexOfT element
void sort
T getMax
Hint: Use a tail pointer in your LinkedList implementation
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
