This project contains custom implementations of common data structures in C/C++, designed for learning and demonstration purposes. All data structures are built using fixed-size arrays without dynamic resizing (except where malloc is explicitly used). The code is well-commented and organized into sections for clarity.
The following data structures are implemented from scratch:
- Static size array
- Operations:
push,pop,peek
- Circular queue using array
- Operations:
enqueue,dequeue - Handles overflow and underflow gracefully
- Hashing via DJB2
- Collision handling: None (static slots)
- Key-value pairs using strings as keys
- Node creation
- Tree traversal:
preorder,inorder,postorder - Utility:
treeHeight, memory management - Supports basic Binary Search Tree (BST) operations like
insertandsearch
- Min-heap based on array
- Operations:
insertItem,extract_min,bubbleUp,bubbleDown - Uses a 1-based index for easier parent/child calculations