(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.
- Year: 2018
- Subject: Data Structures
Related pages
More PYQs on Linear Linked Lists
- Write algorithms for the following : 2×5=10 (i) Split the singly linked list at the middle and make the second half as the first and vice-versa. (ii) Delete al…
- a) Define the terms : static and dynamic data structures. List some of the static and dynamic data structure in C. (10) b) What is traversing? Write an algorit…