Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Q 1.

Write a program to implement the following operations on a singly linked list:

(i) Insertion at the tail


(ii) Insertion at the head
(iii) Insertion after a given node item.
(iv) Deletion at the head
(v) Deletion at the tail
(vi) Deletion from between
(vii) Display the linked list elements in reverse (Hint: Use recursion)
(Head and tail refer to the first and last nodes of a linked list)

Q 2. Write a program to implement following operations on a circular linked list

(i) Insertion in between nodes


(ii) Deletion in between nodes

Q 3. Write a program to implement following operations on doubly linked list

(i) Insertion in between


(ii) Deletion in between

Q 3. L1 and L2 are two sorted linked list of integers. Write code to compute L1 - L2 and store it in
third list L3. ( L1 - L2 means, list of elements that are present in L1 but not in L2 )

You might also like