Pages

Sunday, July 13, 2025

πŸ“š DSA Operation Summary Table

 Sure! Here's a quick-reference summary of all major Data Structures with their key operations (like enqueue/dequeue for Queue). This will help you revise fast for viva or practicals:


πŸ“š DSA Operation Summary Table

Data Structure Key Operations Explanation
Array Insert, Delete, Traverse, Search, Update Fixed size, indexed access
Stack push (top), pop (top), peek LIFO – Last In First Out
Queue enqueue (rear), dequeue (front) FIFO – First In First Out
Circular Queue enqueue (rear), dequeue (front) Rear and front wrap around
Linked List (Singly) Insert, Delete, Traverse Dynamic size, nodes with data and next
Doubly Linked List Insert, Delete, Traverse (both directions) Each node has prev, data, next
Circular Linked List Traverse (ends connect) Last node points to head
Stack using Array/LL push/pop LIFO using static/dynamic memory
Queue using Array/LL enqueue/dequeue FIFO using static/dynamic memory
Binary Tree Insert, Traverse (inorder, preorder, postorder) Tree with 2 children max per node
BST (Binary Search Tree) Insert, Delete, Search Left < Root < Right
Heap (Min/Max) Insert, Delete root, Heapify Complete binary tree with heap property
Graph Add edge, DFS, BFS Nodes connected with edges
Hash Table Insert, Search, Delete Uses hash function for indexing
Trie Insert, Search words Tree-like for strings/words
Priority Queue insert, removeHighestPriority Highest priority removed first
Deque (Double-ended Queue) insertFront, insertRear, deleteFront, deleteRear Insert/Delete from both ends
Matrix (2D Array) Add, Multiply, Transpose Used in mathematical operations
String (as DS) Reverse, Palindrome, Frequency Treated as character array
Polynomial (using LL) Add, Multiply Each node has coefficient & exponent

🧠 Quick Mnemonics:

  • Stack = LIFO → Last In First Out → Use push/pop from top

  • Queue = FIFO → First In First Out → Use enqueue (rear), dequeue (front)

  • BST = Sorted Binary Tree → Left < Root < Right

  • Heap = Max/Min tree → Root has highest/lowest value

  • Graph → Uses edges and nodes, can be directed/undirected


Let me know if you want a printable PDF of this or code examples for each.

No comments:

Post a Comment

Stack using Linked List – Partial (University Exam Topic)

 #include <iostream> using namespace std; struct Node {     int data;     Node* next; }; class Stack {     Node* top; public:     Stac...