Hi guys,
I read that we need to do this
LinkedList<Integer> test = new LinkedList<Integer>();
in order to have to specify the object type. What if the linked list is an array?
My init code is something like this
LinkedList[] list;
int size, max_length, total_elements;
// Constructor
public SortedList(int n) {
// Set Total Elements
total_elements = 0;
// Deteermine The Size Of The Linked List Array
size = (int) Math.sqrt(n);
// Determine The Max Length Of Individual Linked List
max_length = (int) n/size;
// Create The Linked List
list = new LinkedList[size];
// Init The Linked List
for(int i = 0; i < size; i++) {
list[i] = new LinkedList();
}
}