Ds Lab
Ds Lab
1. Write a program to input 5 integer values and print them on the screen.
2. Write a program to traverse a 1-d array and add number 5 to each element of the array.
3. Write a program to implement linear search.
4. Write a program to insert an element in an array in the following positions:
At the end of the array
At any desired location
5. Write a program to delete an element from an array from the following positions:
From the end of the array
From any desired location
6. Write a program to sort an array using the following sorting techniques:
Bubble sort
Insertion sort
Selection sort
7. Write an interactive program to create an array of 20 records having following field: name
and marks. Sort the record (based on marks) using bubble sort. Search for a record using
binary search.
8. Write a program to merge two sorted arrays.
9. Write a program to find the sum of two matrices.
10. Write a program to find the transpose of a matrix.
11. Write a program to implement stack data structure.
12. Write a program to implement queue data structure.
13. Write a program to implement stack using linked list.
14. Write a program to implement queue using linked list.