A structured, clean reference repository for mastering Data Structures and Algorithms — implemented in C#, organized for clarity, and built for long-term growth.
DSA-Vault/
│
├── DataStructures/
│ ├── Arrays/
│ │ └── Array_Op.cs
│ ├── LinkedList/
│ │ └── LinkedList_Op.cs
│ ├── Stack/
│ ├── ImpW_Array.cs
| ├── ImpW_LinkedList.cs
| ├── StackApplication - Balanced Parentheses.cs
| └── StackApplication - Infix To Postfix Converter.cs
│ ├── Queue/
| ├── ImpW_Array (SimpleType).cs
│ ├── ImpW_Array (CircularType).cs
| ├── ImpW_LinkedList (CircularType).cs
| └── ImpW_LinkedList (SimpleType).cs
│ ├── Trees/
│ └── Trees.cs
│ ├── Graphs/
│ └── Graphs.cs
│ └── HashTables/
│ └── HashTables.cs
│
├── Algorithms/
│ ├── Sorting/
│ ├── Searching/
│ ├── DynamicProgramming/
│ ├── Greedy/
│ ├── Backtracking/
│ └── GraphAlgorithms/
│
└── Misc/
├── BitManipulation/
├── MathProblems/
└── Notes/
| File Path | Operation | Complexity |
|---|---|---|
| Arrays/Array_Ops.cs | getMid(size) | O(1) time |
| addFront() | O(n) time, O(n) space | |
| remoFront() | O(n) time, O(n) space | |
| addMiddle() | O(n) time, O(n) space | |
| remoMiddle() | O(n) time, O(n) space | |
| addEnd() | O(n) time, O(n) space | |
| remoEnd() | O(n) time, O(n) space | |
| Search() | O(n) time, O(1) space | |
| Reverse() | O(n) time, O(n) space | |
| Display() | O(n) time, O(1) space | |
| LinkedList/LinkedList_Ops.cs | Size() | O(n) time, O(1) space |
| getMid() | O(1) time | |
| addFront() | O(1) time, O(1) space | |
| remoFront() | O(1) time | |
| addMiddle() | O(n) time, O(1) space | |
| remoMiddle() | O(n) time, O(1) space | |
| addEnd() | O(n) time, O(1) space | |
| remoEnd() | O(n) time, O(1) space | |
| search() | O(n) time, O(1) space | |
| Clear() | O(1) time | |
| Reverse() | O(n) time, O(1) space | |
| Display() | O(n) time, O(1) space | |
| Stack/ImpW_Array.cs | Push (no resize) | O(1) time, O(1) space |
| Push (with resize) | O(n) time, O(n) space | |
| Push (amortized) | O(1) amortized time | |
| Pop() | O(1) time | |
| Top() | O(1) time | |
| IsEmpty | O(1) time | |
| Count | O(1) time | |
| Clear() | O(1) time | |
| Contains() | O(n) time, O(1) space | |
| PushIfNotExists() | O(n) time, O(1) space | |
| PrintStack() | O(n) time, O(1) space | |
| Resize() | O(n) time, O(n) space | |
| Stack/ImpW_LinkedList.cs | Push() | O(1) time, O(1) space |
| Pop() | O(1) time | |
| Top() | O(1) time | |
| IsEmpty | O(1) time | |
| Clear() | O(1) time | |
| Size() | O(n) time, O(1) space | |
| PrintStack() | O(n) time, O(1) space | |
| Stack/StackApplication - Balanced Parentheses.cs | IsBalanced() | O(n) time, O(n) space worst-case |
| Push() (char version) | O(1) amortized | |
| Pop() | O(1) time | |
| Contains() | O(n) time | |
| Stack/StackApplication - Infix To Postfix Converter.cs | Convert() | O(n) time, O(n) space |
| EvaluatePostfix() | O(n) time, O(n) space | |
| IsOperator() | O(1) time | |
| GetPrecedence() | O(1) time | |
| IsRightAssociative() | O(1) time | |
| Queue/ImpW_Array (SimpleType).cs | Enqueue() | O(1) time |
| Dequeue() | O(1) time | |
| Peek() | O(1) time | |
| Count | O(1) time | |
| IsEmpty | O(1) time | |
| IsFull | O(1) time | |
| Clear() | O(1) time | |
| Contains() | O(n) time, O(1) space | |
| ToArray() | O(n) time, O(n) space | |
| Queue/ImpW_Array (CircularType).cs | Enqueue() | O(1) time |
| Dequeue() | O(1) time | |
| Peek() | O(1) time | |
| Count | O(1) time | |
| IsEmpty / IsFull | O(1) time | |
| Clear() | O(1) time | |
| Contains() | O(n) time, O(1) space | |
| ToArray() | O(n) time, O(n) space | |
| Queue/ImpW_LinkedList (SimpleType).cs | Enqueue() | O(1) time, O(1) space |
| Dequeue() | O(1) time | |
| Peek() | O(1) time | |
| Count | O(1) time | |
| IsEmpty | O(1) time | |
| Clear() | O(1) time | |
| Contains() | O(n) time, O(1) space | |
| ToArray() | O(n) time, O(n) space | |
| Queue/ImpW_LinkedList (CircularType).cs | Enqueue() | O(1) time, O(1) space |
| Dequeue() | O(1) time | |
| Peek() | O(1) time | |
| Count | O(1) time | |
| IsEmpty | O(1) time | |
| IsFull | O(1) time (always false) | |
| Clear() | O(1) time | |
| Contains() | O(n) time, O(1) space | |
| ToArray() | O(n) time, O(n) space |
| Structure | Status | Operations Covered |
|---|---|---|
| Arrays | ✅ Done | AddFront, AddMiddle, AddLast, RemoveFront, RemoveMiddle, RemoveLast, Display |
| Linked List | ✅ Done | AddFront, AddMiddle, AddEnd, RemoveFront, RemoveMiddle, RemoveEnd, Display |
| Stack | ✅ Done | Push, Pop, Top, IsEmpty, Count, Clear, Contains, PushIfNotExists, PrintStack, Capacity, Resize, AskToResize |
| Queue | ✅ Done | Enqueue, Dequeue, Peek, Count, IsEmpty, IsFull, Contains, Clear, ToArray |
| Trees | ⬜ Planned | — |
| Graphs | ⬜ Planned | — |
| Hash Tables | ⬜ Planned | — |
| Category | Status |
|---|---|
| Sorting | ⬜ Planned |
| Searching | ⬜ Planned |
| Dynamic Programming | ⬜ Planned |
| Greedy | ⬜ Planned |
| Backtracking | ⬜ Planned |
| Graph Algorithms | ⬜ Planned |
Demonstrates core array manipulation including insertion and deletion at the front, middle, and end, along with full display. Focuses on understanding index shifting and bounds handling.
Implements a singly linked list from scratch with node-based insertion and deletion at all positions. Highlights pointer management and traversal logic.
| Concept | Key Idea |
|---|---|
| Array | Fixed-size, index-based, O(1) access, O(n) insert/delete |
| Linked List | Dynamic size, pointer-based, O(n) access, O(1) insert at head |
| Stack | LIFO — Last In, First Out |
| Queue | FIFO — First In, First Out |
| Tree | Hierarchical structure, parent-child relationships |
| Graph | Nodes + Edges, directed or undirected |
| Hash Table | Key-value pairs with O(1) average lookup |
- Language: C# (.NET)
- IDE: Visual Studio / VS Code
- Paradigm: Console-based implementations, no external libraries
# Clone the repository
git clone https://github.com/your-username/DSA-Vault.git
# Navigate to any topic
cd DataStructures/Arrays
# Open in Visual Studio or run with dotnet
dotnet run- Complete all core Data Structure implementations
- Implement and annotate all major Sorting algorithms
- Add Searching algorithms (Binary, Linear, etc.)
- Cover Dynamic Programming patterns
- Add time & space complexity notes per file
- Include example problems for each structure/algorithm
- Re-implement Using Python
All implementations are written for learning purposes — readability and clarity are prioritized over micro-optimization. Each file is self-contained and runnable independently.
"First, solve the problem. Then, write the code." — John Johnson
This repository is open for personal and educational use. Feel free to fork, reference, or build upon it.