A robust, template-based C++ library providing a wide range of fundamental data structures. This project implements a Generic Approach, allowing the library to handle any data type (int, float, char, or custom objects) while maintaining high performance and memory efficiency.
- Generic Implementation: Uses C++ Templates (
template <class T>) for flexibility. - Memory Optimization: Uses
#pragma pack(1)to prevent unnecessary memory padding. - Consistent Documentation: Every function is documented with its Purpose, Input, and Output.
- Object-Oriented Design: Clean separation between Node classes and Functionality classes.
The library is categorized into Linear and Non-Linear structures:
| Data Structure Type | Node Class | Functionality Class |
|---|---|---|
| Singly Linear | SinglyLLLnode |
SinglyLLL |
| Singly Circular | SinglyCLLnode |
SinglyCLL |
| Doubly Linear | DoublyLLLnode |
DoublyLLL |
| Doubly Circular | DoublyCLLnode |
DoublyCLL |
| Stack (LIFO) | Stacknode |
Stack |
| Queue (FIFO) | Queuenode |
Queue |
#include "GeneralizedDS.cpp"
int main() {
SinglyLLL<int> *obj = new SinglyLLL<int>();
obj->InsertFirst(51);
obj->InsertFirst(21);
obj->InsertFirst(11);
obj->Display(); // Output: | 11 |-> | 21 |-> | 51 |-> NULL
return 0;
}Prajwal Sanjay Pansare
GitHub: @pansareprajwal
LinkedIn: Prajwal Pansare