Question
Create an ExtLinkedList class by extending the LinkedList class to i nclude the following methods and estimate the run-time complexity of each method. Please Help!
Create an ExtLinkedList
Please Help!
-
public ExtLinkedList
evenList() // gets the elements E in locations 0,2,4,6,... of this list and puts them in a new ExtLinkedList in that order and returns it // make sure to handle errors -
public ExtLinkedList
intsersect (ExtLinkedList eli) // picks out elements that are common to this ExtLinkedList and eli// and returns them in the form of a new ExtLinkedList // once again, you can use equals () method // the new list should not have duplicate elements // handle errors or exceptional situations appropriately. // example: this: {1,3,4,4}, parameter : {1,4,5,7} then return {1,4}
Template:
import java.util.*; public class ExtLinkedList
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started