Wednesday, 16 June 2021

DS LAB (II) Assignment 1 Binary Search Tree and Traversals

Binary Search Tree and Traversals Normal 0 false false false EN-US X-NONE X-NONE ...

DS LAB(II) Assignment 2 Binary Tree Applications

Binary Tree Applications Set Aa) Write a C program which uses Binary search tree library and displays nodes at each level, count of node at each level and total levels in the tree. Set Ba) Write a program to sort n randomly generated elements using Heapsort meth...

DS LAB (II) Assignment 3 Graph as Adjacency Matrix

Graph as Adjacency Matrix Set Aa) Write a C program that accepts the vertices and edges of a graph and stores it as an adjacency matrix. Display the adjacency matrix. b) Write a C program that accepts the vertices and edges of a graph and store it as an adjacency matrix. Implement functions to print indegree, outdegree and total degree of all vertices of graph. Set Ba) Write a C program that accepts the vertices and edges of a graph...

DS LAB (II) Assignment 4 Graph as Adjacency List

Graph as Adjacency List Set Aa) Write a C program that accepts the vertices and edges of a graph. Create adjacency list and display the adjacency list.b) Write a C program that accepts the vertices and edges of a graph. Create adjacency list. Implement functions to print indegree, outdegree and total degree of all vertex of graph. Set Ba) Write a C program that accepts the vertices and edges of a graph and store it as an adjacency...

Sunday, 6 June 2021

DS-(I) Assignment 9: Linear Queue and Circular queue

 Set A. a)Implement a linear queue library (st_queue.h) of integers using a static implementation of the queue and implementing the above six operations. Write a program that includes queue library and calls different queue operations.b)Implement a circular queue library (cir_queue.h) of integers using a dynamic (circular linked list) implementation of the queue and implementing the above five operations. Write a menu driven program that...

DS-(I) Assignment 8: Applications of Stack

  Set A. a)Write a program that reverses a string of characters. The function should use a stack library (cststack.h) of stack of characters using a static implementation of the stack.  b)Write a program to convert an infix expression of the form (a*(b+c)*((d-a)/b)) into its equivalent postfix notation. Consider usual precedence’s of operators. Use stack library of stack of characters using static implementation.    Set...

DS-(I) Assignment 7: Stack

  Set A. a) Implement a stack library (ststack.h) of integers using a static implementation of the stack and implementing the above six operations. Write a driver program that includes stack library and calls different stack operations.  b) Implement a stack library (dystack.h) of integers using a dynamic (linked list) implementation of the stack and implementing the above five operations. Write a driver program that includes...

DS-(I) Assignment 6: Linked List Applications

 Set A. 1)Write a program that merges two ordered linked lists into third new list. When two lists are merged the data in the resulting list are also ordered. The two original lists should be left unchanged. That is merged list should be new one. Use linked implementation.  2)Write a program that adds two single variable polynomials. Each polynomial should be represented as a list with linked list implementation. Set B. 1)Write...

DS-(I) Assignment 5: Doubly Linked List – Dynamic Implementation

 Set A. a) Implement a list library (doublylist.h) for a doubly linked list with the above operations. Write a menu driven driver program to call the operations append, insert, delete specific node, delete at position, search, display.  b) Implement a list library (doublylist.h) for a doubly linked list. Create a linked list, reverse it and display reversed linked list. Set B. a) There are lists where insertion should ensure...

DS-(I) Assignment 4: Singly Linked List – Dynamic Implementation

 Set A. a) Implement a list library (singlylist.h) for a singly linked list with the above six operations. Write a menu driven driver program to call the operations. b) Implement a list library (singlylist.h) for a singly linked list. Create a linked list, reverse it and display reversed linked list. Set B. a) There are lists where insertion should ensure the ordering of data elements. Since the elements are in ascending order...

DS-(I) Assignment 3: Sorting Algorithms –Counting Sort, Merge Sort, Quick Sort

 Set A. a) Sort a random array of n integers (accept the value of n from user) in ascending order by using recursive Counting sort algorithm. b)Sort a random array of n integers (accept the value of n from user) in ascending order by using a recursive Merge sort algorithm.  c) Sort a random array of n integers (create a random array of n integers) in ascending order by using recursive Quick sort algorit...

DS-(I) Assignment 2: Sorting Algorithms – Bubble Sort, Insertion Sort, Selection Sort

 Set A. a) Sort a random array of n integers (accept the value of n from user) in ascending order by using bubble sort algorithm. b) Sort a random array of n integers (create a random array of n integers) in ascending order by using insertion sort algorithm.  c) Sort a random array of n integers (accept the value of n from user) in ascending order by using selection sort algorithm. Set B. a) Read the data from the file “employee.txt”...

DS-(I) Assignment 1: Searching Algorithms

 Set A. a) Create a random array of n integers. Accept a value x from user and use linear search algorithm to check whether the number is present in the array or not and output the position if the number is present. b) Accept n values in array from user. Accept a value x from user and use sentinel linear search algorithm to check whether the number is present in the array or not and output the position if the number is present.  c) ...