/Data-Structure-and-Algorithm

Lab work of DSA in C++

Primary LanguageC++MIT LicenseMIT

Data-Structure-and-Algorithm-Lab-works-

Lab work of DSA in C++ with Documentation.

LAB1-STACK

 1.WAP for array implementation of Stack
 
 2.WAP to reverse a list using stack 
 
 3.WAP to check parenthesis of algebraic expression using stack  
 
 4.WAP to convert infix to postfix using Stack 
 
 5.WAP to evaluate postfix expression using Stack
 
 6.WAP to convert an infix expression into a prefix expression 
 
 7.WAP to evaluate a prefix expression

LAB2-QUEUE

1.WAP for array implementation of Linear Queue

2.WAP for implementation of Circular Queue

LAB3-LIST

1.WAP to implement contiguous list using array

2.WAP for list implementation of QUEUE

LAB4-LINKED LIST

1.WAP to implement singly linked list

2.WAP to implement circular linked list 

3.WAP to implement doubly linked list 

4.WAP to implement priority queue using linked list

5.WAP to implement STACK using linked list

6.WAP to implement QUEUE using linked list

7.Write a program to store a polynomial using linked list. Also, perform addition and subtraction on two polynomials

LAB5-RECURSION

1. Write a recursive program to find factorial of a given number 

2. Write a recursive program to find N terms Fibonacci series 

3. Write a recursive program to solve Tower of Hanoi. 

4. Write a recursive program to find Greatest Common Division GCD of two numbers.

LAB6-TREES

Q.Write a menu driven Program for the following operations on Binary Search Tree (BST) of Integers

 i.Create a BST of N Integers: 5, 10, 25, 2, 8, 15, 24, 14, 7, 8, 35, 2

ii.Traverse the BST in Inorder, Preorder and Post Order

iii.Search the BST for a given element (KEY) and print the appropriate message

iv.Exit

LAB7-SORTING

1.WAP to implement Insertion Sorting Algorithm

2.WAP to implement Merge Sorting Algorithm