Input 1. #include<iostream> #include"question 16 b.cpp" using namespace std; int main() { cout << "\n\t...
Data Structure Practicals
Syllabus with topics linked
Write a program to reverse the order of the elements in the stack using additional Queue
Input 1. #include<iostream> #include"Question 17 b.cpp" #include"Question 17 c.cpp" using namespace std; int main() { cout <<...
Write a program to implement Diagonal Matrix using one-dimensional array
Input #include <iostream> using namespace std; int main() { cout << "\n\t ~~~~~~~~~~~~~~~~~~~~~~~Practical...
Write a program to implement Lower Triangular Matrix using one-dimensional array
Input #include<iostream> using namespace std; void lower(int matrix[3][3], int row, int col) { int i, j; for (i = 0; i < row; i++) {...
Write a program to implement Upper Triangular Matrix using one-dimensional array
Input #include<iostream> using namespace std; // Function to form upper triangular matrix void upper(int matrix[3][3], int row, int...
Write a program to implement Symmetric Matrix using one-dimensional array
Input #include <iostream> using namespace std; /* Symmetric Matrix Class */ class SymmetricMatrix { int *arr; int size; public:...
Write a program to create a Threaded Binary Tree as per inorder traversal, and implement operations like finding the successor / predecessor of an element, insert an element, inorder traversal
// Insertion in Threaded Binary Search Tree. #include<bits/stdc++.h> using namespace std; struct Node { struct Node *left, *right; int...
Write a program to implement various operations on AVL Tree
Input #include<iostream> #include<cstdio> #include<sstream> #include<algorithm> #define pow2(n) (1 << (n)) using...
Write a program to implement heap operations
Input #include <iostream> #include <cstdlib> #include <vector> #include <iterator> using namespace std; class BHeap { private:...