Skip to content

Latest commit

 

History

History
158 lines (110 loc) · 5.99 KB

README.md

File metadata and controls

158 lines (110 loc) · 5.99 KB

DS-LAB

All practice problems and mandatory questions prescribed for S3 B.tech students in CSL 201 for B.tech(2019 Scheme).

  1. Write a program to read two polynomials and store them in an array. Calculate the sum of the two polynomials and display the first polynomial, second polynomial and the resultant polynomial.

  2. C Write a program to enter two matrices in normal form . Write a function to convert two matrices to tuple form and display it. Also find the transpose of the two matrices represented in tuple form and display it. Find the sum of the two matrices in tuple form and display the sum in tuple form. [-----> sparsematrix.c <-----]

  3. Write a program to enter two matrices in normal form . Write a function to convert two matrices to tuple form and display it. Also find the transpose of the two matrices represented in tuple form and display it. Find the sum of the two matrices in tuple form and display the sum in tuple form. (Copy of 2nd One).

  4. Implement a circular queue using arrays with the operations:

       4.1.Insert an element to the queue.       
       4.2.Delete an elements from the queue.
       4.3.Display the contents of the queue after each operation.
        [-----> circularqueue.c <-----]
    
  5. Implement a Queue using arrays with the operations:

     5.1.Insert elements to the Queue.
     5.2.Delete elements from the Queue.
    5.3.Display the contents of the Queue after each operation.
     [-----> queueoperations.c <-----]
    
  6. Implement a Stack using arrays with the operations:

     6.1.Pushing elements to the Stack.
     6.2.Popping elements from the Stack
    6.3.Display the contents of the Stack after each operation.
     [-----> stackoperations.c <-----]
    
  7. Implement a Priority Queue using arrays with the operations:

     7.1.Insert elements to the Priority Queue.
     7.2.Delete elements from the Priority Queue.
     7.3.Display the contents of the Priority Queue after each operation.
      [-----> priorityqueue.c <-----]
    
  8. Implement a Double-Ended Queue (DEQUEUE) with the operations:

     8.1.Insert elements to the Front of the queue.
     8.2.Insert elements to the Rear of the queue
     8.3.Delete elements from the Front of the queue.
     8.4.Delete elements from the Rear of the queue.
     8.5.Display the queue after each operation.
      [-----> doubleendedqueue.c <-----]
    
  9. Using stack convert an infix expression to a postfix expression and evaluate the postfix expression. [-----> infixtopostfix.c <-----]

  10. Write a program to convert an infix expression to a prefix expression using stacks.

  11. Convert an infix expression to a postfix expression without using a stack

  12. Write a menu driven program for performing the following operations on a Linked List:

    12.1.Display
    12.2.Insert at Beginning
    12.3.Insert at End
    12.4.Insert at a specified Position
    12.5.Delete from Beginning
    12.6.Delete from End
    12.7.Delete from a specified Position
     [-----> linkedlistop.c <-----]
    
  13. Implement a stack using linked list with the operations:

    13.1.Push elements to the queue.
    13.2.Pop elements from the queue.
    13.3.Display the queue after each operation.
     [-----> stack_linkedlist.c <-----]
    
  14. Implement a Queue using linked list with the operations:

    14.1.Insert an elements to the queue.
    14.2.Delete an elements from the queue.
    14.3.Display the queue after each operation.
     [-----> queue_linkedlist.c <-----]
    
  15. Write a program to reverse the content of queue using stack

  16. Write a program to read two polynomials and store them using linked list. Calculate the sum of the two polynomials and display the first polynomial, second polynomial and the resultant polynomial. [-----> polynomial_linkedlist.c <-----]

  17. Write a program to read two polynomials and store them using linked list. Find the product of two polynomials and store the result using linked list. Display the resultant polynomial.

  18. Write a program for addition of polynomials containing two variables using linked list. (Implemented in 16th Question).

  19. The details of students(number, name, total-mark) are to be stored in a linked list. Write functions for the following operations:

    19.1.Insert
    19.2.Delete
    19.3.Search
    19.4.Sort on the basis of number
    19.5.Display the resultant list after every operation
    
  20. Create a Doubly Linked List from a string taking each character from the string. Check if the given string is palindrome in an efficient method.

  21. Create a binary tree with the following operations

    21.1.Insert a new node
    21.2.Inorder traversal.
    21.3.Preorder traversal.
    21.4.Postorder traversal.
    21.5.Delete a node.
    
  22. Write a program to create a binary search tree and find the number of leaf nodes

  23. Create a binary search tree with the following operations:

    23.1.Insert a new node .
    23.2.Inorder traversal.
    23.3.Preorder traversal.
    23.4.Postorder traversal.
    23.5.Delete a node.
    
  24. Write a program to sort a set of numbers using a binary tree.

  25. Represent any given graph and

    25.1.Perform a depth first search .
    25.2.Perform a breadth first search
    
  26. Create a text file containing the name, height, weight of the students in a class. Perform Quick sort and Merge sort on this data and store the resultant data in two separate files. Also write the time taken by the two sorting methods into the respective files. Eg. Sony Mathew 5.5 60 Arun Sajeev 5.7 58 Rajesh Kumar 6.1 70

  27. Write a program to sort a set of numbers using Heap sort and find a particular number from the sorted set using Binary Search.

  28. Implement a Hash table using Chaining method. Let the size of hash table be 10 so that the index varies from 0 to 9.

  29. Implement a Hash table that uses Linear Probing for collision resolution