DS Lab Programs

You might also like

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

LIST OF PROGRAMS

Paper Title: Data Structures

1. Implement the following operations on a 1D array:


a) Insert an element in the array
b) Delete an element from the array
c) Search for a given value using Linear Search and Binary Search
d) Count the frequency of occurrence of each element in the array
e) Find the second smallest element in the array
f) Merging of two sorted arrays
g) Sort the elements of the array using Bubble Sort, Selection Sort and Insertion Sort
2. Implement the following operations on a 2D array:
a) Search a given element
b) Multiplication of two 2D arrays
3. Implement Single Linked List with the following operations:
a) Create a linked list
b) Insert a node in the front, at the end and at any other position
c) Delete the first node, last node and any other node
d) Search the node with a given value in the list
e) Count the number of nodes in the list
4. Implement Circular Linked List with the following operations:
a) Create a linked list
b) Insert a node in the front, at the end, at any other position
c) Delete a node from start, last node, any other node
d) Display the contents of the entire list
e) Count the number of nodes
5. Implement Doubly Linked List with the following operations:
a) Create a linked list
b) Insert a node in the front, at the end, at any other position
c) Delete a node from start, last node, any other node
d) Display the contents of the entire list
e) Count the number of nodes
6. Implement polynomials using linked lists with the following operations:
a) Addition of two polynomials
b) Subtraction of two polynomials
c) Multiplication of two polynomials
7. Implement all the primitive operations of a stack using an array.
8. Implement all the primitive operations of a stack using a linked list.
9. Check if a given arithmetic expression is correctly parenthesized or not.
10. Reverse the contents of the stack using recursion.
11. Reverse the contents of the stack without using recursion.
12. Implement all the primitive operations of a queue using an array.
13. Implement all the primitive operations of a queue using a linked list.
14. Implement all the primitive operations of a circular queue using an array.
15. Implement all the primitive operations of a priority queue using a linked list.
16. Implement the following operations using stacks:
a) Conversion of infix notation to postfix notation
b) Evaluation of Postfix expression
17. Implement binary search tree and perform the following operations:
a) Traverse the tree in preorder, inorder, postorder.
b) Insert a node in the BST
c) Delete a node from the BST.
18. Implement graph traversal algorithms (BFS, DFS)
19. Implement shortest path algorithm (Dijkstra’s algorithm).
20. Implement quick sort and merge sort algorithms.

You might also like