DATA STRUCTURES AND ALGORITHM LABORATORY Syllabus for NIT Jalandhar
CS-219 DATA STRUCTURES AND ALGORITHM LABORATORY [0 0 2 1]
Write Program in C or C++ for following.
Write a C+ program to the following operations on stack of integers:
a> push b>pop c> display
The program should print appropriate messages for stack overflow, stack Underflow & stack empty.
Write a C++ program to convert & print a given valid parenthesized in fix Arithmetic expression to postfix expression. The expression consists of single character operands & + , – ,*,/ operators .
Write a c program to evaluate a valid suffix / postfix expression using a Stack, assume that the suffix / postfix expression is read as a single line consisting of non negative single digit operands & binary arithmetic operands. The arithmetic operators are + (ADD), – (subtract), *(multiply) & / (divide).
Write a C++ program to simulate the working a queue of integers using an array. Provide the a) insert b) delete c) display
Write a C++ program to simulate the working of a circular queue of integers using an array. Provide the following operations: a) insert b) delete c)Display
Write a program to design a priority queue which is maintained as a set of queue (assume a maximum of 3 queues). The elements are inserted based upon the given priority. The deletion of an element is to be done starting from the 1st queue, if it is not empty .If it is empty ,The elements from the 2nd queue will be deleted & so on.
Write a C++ program using dynamic variable & pointers to construct a singly linked list consisting of the following information in each node. Student id (integer), student name( character string) & semester(integer). The operations to be supported are
inserting in front of list
Deleting a node based on student id, if the specified node is not present in the list, error message should be displayed
Searching a node based on student id , if the specified node is not present in the list, error message should be displayed
Displaying all the nodes in the list
Write a C++ program using dynamic variables & pointers to construct an ordered(ascending) singly linked list based on the rank of the student, where each node consists of the following information student id( integer)student name(character), rank(integer)
Write a C++ program using dynamic variables & pointers to construct a singly linked list to perform the operations of a stack of integers
) Push b) pop c) display
0. The program should print appropriate message for stack overflow & stack empty
Department of Computer Science and Engineering
. Write a C++ program to support the following operations on a doubly linked where each node each node consists of integers
Create a doubly linked list by adding each node front
Insert a new node to the left of the node whose key value is read as a input
Delete the node of a given data, if it is found, otherwise display appropriate message
Display the content of the list
. Write C++ program
To construct a binary search tree of integers
o traverse the tree using all the methods i.e. inorder, preorder & postorder to display the elements in the tree
. Write C++ program for the following searching techniques over a list of integers.
. Write a C++ program to sort a list of N integers using the quick sort algorithm.
Write a C++ program to sort a list of N strings using the insertion sort algorithm.
Write a C++ program to sort a list of N integers using Heap sort algorithm.