Java LinkedList
Q1.
Which of the following statements about LinkedList in Java is TRUE?
Q2.
What is the time complexity of inserting an element at the beginning of a LinkedList?
Q3.
Which interfaces are implemented by LinkedList?
Q4.
What will the following code output?
LinkedList<String> list = new LinkedList<>();
list.add("Java");
list.addFirst("C++");
list.addLast("Python");
System.out.println(list);
Q5.
What exception does LinkedList throw when accessing an invalid index?