0% found this document useful (0 votes)
220 views

Dsa Lab It Labmanual

This document contains a list of 25 programming assignments related to data structures and algorithms. The assignments cover topics such as arrays, strings, stacks, queues, linked lists, trees, graphs, sorting, and searching. Some example assignments are to implement operations on arrays and linked lists, convert expressions between infix and postfix notation, simulate a priority queue, and implement sorting algorithms like insertion sort, selection sort, and quicksort.

Uploaded by

poojadhanrajani
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)
220 views

Dsa Lab It Labmanual

This document contains a list of 25 programming assignments related to data structures and algorithms. The assignments cover topics such as arrays, strings, stacks, queues, linked lists, trees, graphs, sorting, and searching. Some example assignments are to implement operations on arrays and linked lists, convert expressions between infix and postfix notation, simulate a priority queue, and implement sorting algorithms like insertion sort, selection sort, and quicksort.

Uploaded by

poojadhanrajani
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/ 4

Banarsidas Chandiwala Institute of Information and Technology

(Affiliated to GGSIP University)

Data & File Structures Lab


(MCA 152)

1. Program to perform operations like adding, updating, deleting elements in an array.

2. Program to order alphabets of a word in Lexical order.

3. Program to implement of sparse matrix using array in Row major representation.

4. Program for creation of adjacency matrix.

5. Program to eliminate duplicate elements in the array.

6. Program to reverse the string using stack.

7. Write a menu driven program to search an element, to find maximum and


minimum element and count the number of elements in the linked list.

8. Given a two dimensional array of letters and a list of words. Write a program to
find the word from the puzzle. These may be horizontal, vertical or diagonal in
direction.

1 2 3 4
1 t h i s
2 w a t s
3 o a h g
4 f g d t

9. Program to create a Linked List & perform the following operations:


i. Insert an element in the beginning
ii. Insert an element at the end
iii. Insert an element in between
iv. To delete a node
v. Display the nodes
vi. Count elements
10. Modify the above program’s data structure to double linked list structure.
11. Program to create Stack using Array and Linked List and perform push and pop
operations.
12. Program to create Queue using Array and Linked List and perform push and pop
operations.
13. Program to create double ended Queue using Linked List and perform Add and
Delete operations.
14. Program for Polynomial creation using Linked List and perform operations like
addition and subtraction on polynomial representation in one variable.
15. Program for Conversion of given Arithmetic Expression (A+B) (C+D) from
infix to postfix notation.
16. Program for Evaluation of Postfix Arithmetic expression.
17. Choose a number, reverse its digits and add it to the original. If the sum is not a
palindrome, repeat this procedure. If a resulting palindrome does not exist within 10
iterations (additions), your program must compute the number of decimal digits in
the last iteration that is obtained through the additions. Implement it using Stack.
e.g.
Choose no. : 1234 /895 Reverse its digit: 4321/598
Add : 1234 /1439 Result: 5555 / 9341
Check whether it’s Palindrome or Not?
18. Implement a Ready queue for set of processes using Priority Queue having burst
time in ms and time slice/quantum of 10 ms. Show the state of each process
entering or leaving the queue.
Arrival time Process Priority Burst time
1 P1 1 50
1 P2 2 60
1 P3 4 40
1 P4 5 60
1 P5 1 30
1 P6 5 20
1 P7 3 30
1 P8 2 40
1 P9 4 10
1 P10 1 10

Initial status of priority queue having priority 1 to 5 (1-high and 5 –Low):

1 p1 p5 p10
2 p2 P8
3 P7
4 P3 P9
5 P4 P6
19. Assume that main memory can accommodate only 3 pages of size 1 K each.
Consider the allocation of main memory with corresponding page faults
as follows: 1, 2, 3, 4, 5, 2, 1, 2, 4. Determine the total no. of page faults using LRU
page replacement algorithm. Show memory allocation stage after each page being
brought into the main memory using stack.
free
page 2(t1)
page 1(t0)

20. Program to implement Graph Traversal using BFS and DFS.


21. Program to create a BST
i) Insert a node at a particular position
ii) Search a node
iii) Delete a node from a given position
22. Program to implement linear search on an array.
23. Program to implement Binary search on an array.
24. Program to implement selection/Insertion/ Heap sorting algorithm.
25. Program to implement sorting algorithms and also compute time taken by each
Sorting algorithm on similar set of data. State it’s Best, Average and Worst case
complexity.
i) Insertion sort
ii) Selection Sort
iii) Quick Sort
iv) Merge Sort
v) Shell Sort
vi) Heap Sort
vii) Radix Sort

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy