Write a method merge that takes two doubly linked


Build a class (DLList) that satisfies the doubly linked list ADT and stores data of (type String) then, write a program that will initialize 2 objects of the class (DLList), read the contents of the 2 doubly linked lists from the user. Then do the following:

1)Write a method (print) that takes a doubly linked list and an integer as input, then it will print the list in order if the input integer was 1, and reverse the list if the input was -1, and print both list in order and reverse order.

2)Write a method (merge) that takes two doubly linked lists as input and outputs a new sorted doubly linked list.

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Write a method merge that takes two doubly linked
Reference No:- TGS01149704

Now Priced at $30 (50% Discount)

Recommended (92%)

Rated (4.4/5)