Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Implement these interfaces using Doubly Linked List in java. public interface List { /** * Add item at the end * * @param e */
Implement these interfaces using Doubly Linked List in java.
public interface List{ /** * Add item at the end * * @param e */ void add(T e); /** * add item at index specified * * @param index * @param e */ void add(int index, T e); /** * This method adds an element to the list in the position , after to the * first occurrence of the the target element * * */ void addAfter(T target, T elem); /** * This method adds an element to the list in the position , previous to * the first occurrence of the the target , element * * */ void addBefore(T target, T elem); /** * Retreive element at index * * @param index * @return */ T get(int index); /** * return true if it is empty * * @return */ boolean isEmpty(); /** * add at the start * * @param e */ void prepend(T e); /** * This method removes the first occurance of the target from the list * * */ T remove(T target); /** * return current size of list * * @return */ int size(); }
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