Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 8th International Symposium Sstd 2003 Santorini Island Greece July 2003 Proceedings Lncs 2750

Authors: Thanasis Hadzilacos ,Yannis Manolopoulos ,John F. Roddick ,Yannis Theodoridis

2003rd Edition

3540405356, 978-3540405351

More Books

Students also viewed these Databases questions