(a) Given pointers L 1 and L 2 of two sorted singly linked lists of i…

Previous year question for Data Structures.

Question

(a) Given pointers L 1 and L 2 of two sorted singly linked lists of integers. The lists may have some common elements. Write an algorithm to create a new sorted singly linked list 1, consisting the elements of L1 U L2 ( L1 union L2 ).

(b) What are the problems of a circular link list? Specify the appropriate data structure which can overcome the above problems. Using the above data structure, write a routine which inserts a node with information field x to the right of node p.

Related pages

More PYQs on Linear Linked Lists

Open on CachedInfo