Question: Implement the get(int index) method. on to this code.. not on java but just by word describe the best, average, and worst case time complexity


Implement the get(int index) method. on to this code.. not on java but just by word describe the best, average, and worst case time complexity of the method using Big O notation
public class LAB13 {
public interface List
void add(T element);
void insert(int index, T element);
T remove(int index);
T get(int index);
int size();
}
public class LinkedList
private LinkedNode
private LinkedNode
private int size;
public LinkedList() {
head = null;
tail = null;
size = 0;
}
@Override
public void add(E element) {
// TODO Auto-generated method stub
}
@Override
public void insert(int index, E element) {
// TODO Auto-generated method stub
}
@Override
public E remove(int index) {
// TODO Auto-generated method stub
return null;
}
@Override
public E get(int index) {
// TODO Auto-generated method stub
return null;
}//
@Override
public int size() {
// TODO Auto-generated method stub
return 0;
}
}
public class LinkedNode
private E data;
private LinkedNode
public LinkedNode(E data) {
this(data, null);
}
public LinkedNode(E data, LinkedNode
this.data = data;
this.next = next;
}
public E getData() {
return data;
}
public void setData(E data) {
this.data = data;
}
public LinkedNode
return next;
}
public void setNext(LinkedNode
this.next = next;
}
}
}
public class LAB13 public interface List
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
