Data Structures lab (Bsc(Cs)II-III)

Click Here For Lab Answers

                                                                           Data Structures Lab(BS306)

1. Write programs to implement the following using an array: a) Stack ADT b) Queue ADT.

2. Write a program to convert the given infix expression to postfix expression using stack.

3. Write a program to evaluate a postfix expression using stack.

4. Write a program to ensure the parentheses are nested correctly in an arithmetic expression.

5. Write a program to find following using Recursion
     a) Factorial of +ve Integer  b) nth term of the Fibonacci Sequence    c) GCD of two +ve integers

6. Write a program to create a single linked list and write functions to implement the following         operations.
   a. Insert an element at a specified position
   b. Delete a specified element in the list
   c. Search for an element and find its position in the list
   d. Sort the elements in the list ascending order

7. Write a program to create a double linked list and write functions to implement the following operations.
  a. Insert an element at a specified position
  b. Delete a specified element in the list
  c. Search for an element and find its position in the list
  d. Sort the elements in the list ascending order

8. Write a program to create singular circular linked lists and function to implement the following operations.
   a. Insert an element at a specified position
   b. Delete a specified element in the list
   c. Search for an element and find its position in the list

9. Write programs to implement the following using a single linked list:
      a. Stack ADT b. Queue ADT.

10.Write a program to implement Binary search technique using Iterative method and Recursive methods.

11. Write a program for sorting the given list numbers in ascending order using the following          technique: Bubble sort and Selection sort
12. Write a program for sorting the given list numbers in ascending order using the following technique: Insertion sort and Quick sort

13. Write a program for sorting the given list numbers in ascending order using the following technique: Merge sort and Heap sort

14. Write a program to traverse a binary tree in following way.
         a. Pre-order     b. In-order     c. Post-order

15.  Write a program to the implementation graph traversals – BFS and DFS.

16. Write a program to find the minimum spanning tree for a weighted graph using
        a. Prim’s Algorithm  b. Kruskal’s Algorithm.

Note:
Write the Pseudo Code for the above programs.
Recommended to use Open Source Software: GCC on Linux; DevC++ (or) CodeBlocks on Windows.


                                                                   For more info visit    https://degreecsa.blogspot.in

No comments:

Post a Comment