Question: 1. Implement insertion, deletion and search for a doubly-linked list as defined in class. Input: -list of pairs of an integer and an operation, e.g.,

1. Implement insertion, deletion and search for a doubly-linked list as defined in class.

Input:

-list of pairs of an integer and an operation, e.g., 1.in 3.in 5.in 3.del 2.in 1.sch .. (insertions are to be taken place at the head unless otherwise specified)

-Input with operations to insert in a specific position in the list other than the head

(note that deletes are down only with reference to the value of the node than the position index):

-A sample input sequence: 1.in 3.in 5.in 3.del 7.in 9.in 11.in 12.in 2.in 1. sch 15.in_7

/* Notice that pairs are delimited by a single space in between. Note that input is to be read in from a file in a batch. */

Output:

-The list before operation and the list after operation displayed on the screen standard outout (not into a file).

-Note that output of a sch is to be found or not found.

-If a duplicate is inserted display duplicate key. (I know its an O(n), smiles), and reject it.

Any other way different then note it in the README file.

Write in java, intermediate level.

Thanks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!