This repository contains clean and modular implementations of core Data Structures in C++, designed for learning, experimentation, and technical mastery.
Each data structure is implemented from scratch to provide a deep understanding of how it works internally — covering both logic and performance analysis.
- Arrays — Insertion, deletion, and traversal
- Linked List — Singly, Doubly, and Circular Linked Lists
- Stack — Implemented using both arrays and linked lists
- Queue — Simple, Circular, and Priority Queue implementations
- Trees — Binary Tree, Binary Search Tree (BST), AVL Tree
- Graphs — Adjacency List, Adjacency Matrix, BFS & DFS Traversals
- Hash Tables — Linear Probing and Chaining techniques
- Dynamic Memory Management (
newanddelete) - Pointers and References
- Recursive and Iterative Implementations
- Templates for Generic Data Structures
- Time and Space Complexity Analysis
- Object-Oriented Programming Principles
Data-Structure-in-Cpp/
├── Basics Of CPP/
│ └── All the basic concepts
│
├── STL/
│ └── All the concepts of STL( vectors, lists, maps, functions etc...)
│
├── Arrays/
│ └── array_operations.cpp
│
├── LinkedLists/
│ ├── singly_linked_list.cpp
│ ├── doubly_linked_list.cpp
│ └── circular_linked_list.cpp
│
├── Stack/
│ ├── stack_using_array.cpp
│ └── stack_using_linkedlist.cpp
│
├── Queue/
│ ├── queue.cpp
│ ├── circular_queue.cpp
│ └── priority_queue.cpp
│
├── Trees/
│ ├── binary_tree.cpp
│ ├── bst.cpp
│ └── avl_tree.cpp
│
├── Graphs/
│ ├── graph_adjlist.cpp
│ ├── graph_adjmatrix.cpp
│ └── bfs_dfs.cpp
│
├── Hashing/
│ ├── hash_linear_probing.cpp
│ └── hash_chaining.cpp
│
└── README.md
# Clone the repository
git clone https://github.com/udityamerit/Data-Structure-in-Cpp.git
# Move to the project directory
cd Data-Structure-in-Cpp
# Compile any C++ file (example)
g++ LinkedLists/singly_linked_list.cpp -o linkedlist
# Run the executable
./linkedlist| Data Structure | Average Time Complexity | Space Complexity |
|---|---|---|
| Array | O(1) Access, O(n) Insert/Delete | O(n) |
| Linked List | O(n) | O(n) |
| Stack / Queue | O(1) | O(n) |
| Binary Search Tree | O(log n) | O(n) |
| AVL Tree | O(log n) | O(n) |
| Heap | O(log n) | O(n) |
| Graph Traversal | O(V + E) | O(V + E) |
| Hash Table | O(1) Average | O(n) |
- Add advanced trees (Red-Black Tree, B-Tree, Segment Tree)
- Implement Graph Algorithms (Dijkstra, Kruskal, Floyd-Warshall)
- Integrate Google Test framework for unit testing
- Add visualization support for better understanding
- Include benchmark analysis for all data structures
-
📚 My Knowledge Base: https://udityaknowledgebase.netlify.app/ A collection of my notes, learning materials, and research content in AI, ML, and Data Structures.
-
💼 Portfolio: https://udityanarayantiwari.netlify.app/ Visit to explore my projects, achievements, and technical expertise.
Uditya Narayan Tiwari 🎓 B.Tech CSE (AI & ML) — VIT Bhopal University 💻 Core Team Member — Blockchain Club & Matrix Club 🌐 Portfolio 📘 Knowledge Base 🔗 GitHub | LinkedIn
This project is licensed under the MIT License — you are free to use, modify, and distribute it with proper credit.
⭐ If you find this repository helpful, don’t forget to give it a star and share it with others!