0% found this document useful (0 votes)
4 views2 pages

10.data Structure

Uploaded by

Anil kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

10.data Structure

Uploaded by

Anil kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Data Structure:-

1) Write a Singly linked list programs for


i) insert the nodes at begin. ii) insert the nodes at end.

2) Write a Singly linked list program to sort the nodes. (add_middle prog).
3)
4) Write a program to merge two Singly linked list.

5) Write a prorgram to swap 'k'th node from begining and 'k' node from end in a Singly linked
list.
For Ex: if nodes are
A --- B --- C --- D --- E --- F --- G --- H --- I
if k = 2 , then o/p should be
A --- H --- C --- D --- E --- F --- G --- B --- I

6) Write a Singly linked list program to swap the adjacent nodes.


For Ex: if nodes are
A --- B --- C --- D --- E --- F --- G --- H --- I
then o/p should be
B --- A --- D --- C --- F --- E --- H --- G --- I

7) Write a Singly linked list program to delete a perticular according to any signature of a
given structure.

8) Write a Singly linked list program to delete a perticular node from last and also find the
count of no.of nodes using only single traverse.
Ex: Suppose if there are 7 nodes, and if 2nd node has to be delete from last, then it is 6th
node from starting.
Before delete : A --- B --- C --- D --- E --- F --- G
After delete : A --- B --- C --- D --- E --- G

9) Write a program to delete the duplicate nodes from sorted Singly linked list.

10) Write a program to delete the duplicate nodes from unsorted Singly linked list.

11) Write a program to reverse the data of given Singly linked list.

12) Write a program to reverse the data of only first 'M' no.of nodes of 'N' no.of nodes.
Input the 'M' value during runtime.

13) Write a program to reverse the links of first 'N' no.of nodes of a given Singly linked list.
Before reverse : A --- B --- C --- D --- E --- F --- G --- H
If M = 5 then
After reverse : E --- D --- C --- B --- A --- F --- G --- H

14) Write a program to reverse all links of given Singly linked list
i) using loops ii) using recursion.

15) Write a Singly linked list program to check the given linked list is palindrome or not.

16) Write a Singly linked list program to implement Stack and Queue operations.
17) Write the Double linked list programs for the all above question.

18) Wrtie a program to delete a node in a Circular Linked List.

19) Write a program to construct Binary-tree by the given nodes and print it in the order
i) pre-order ii) in-order iii)post-order

20) Write a program to search a node in a given Binary-tree.

21) Write a program to delete a particular node in a given Binary-tree according to any signature
of a given structure.

-------------------------------------------------- END ---------------------------------------------------

You might also like