A comprehensive collection of 10 beginner-to-intermediate DSA projects implemented in C++, demonstrating practical applications of fundamental data structures and algorithms.
- Overview
- Projects
- Technologies Used
- Installation & Setup
- How to Run
- Project Structure
- Learning Outcomes
- Contributing
- Author
This repository contains 10 complete DSA projects built from scratch in C++. Each project focuses on different data structures and algorithms, providing hands-on experience with:
- Data Structures: Linked Lists, Binary Search Trees, Heaps, Stacks, Queues, Graphs, Hash Maps
- Algorithms: Sorting (6 algorithms), Searching, Graph Traversal (BFS/DFS), Heapify operations
- Real-world Applications: Student management, contact books, task schedulers, maze solvers, and more
All projects feature:
- β Menu-driven user interfaces
- β Comprehensive comments and documentation
- β Error handling and input validation
- β File I/O for data persistence
- β Clean, readable code structure
Data Structure: Singly Linked List
Features:
- CRUD operations for student records
- Search by roll number, name, or department
- Sort by roll number, name, or GPA
- CSV file export/import
- Statistical analysis (average GPA, top performers)
Key Concepts: Linked List operations, File I/O, Sorting algorithms
Data Structure: Binary Search Tree (BST)
Features:
- Add/delete contacts (auto-sorted alphabetically)
- Search by name (exact or prefix matching)
- Display in alphabetical order
- Export to CSV
- Categorize contacts (Family, Friends, Work, etc.)
Key Concepts: BST operations, Tree traversal (Inorder), Prefix search
Data Structure: Min Heap (Priority Queue)
Features:
- Add tasks with priority levels (High/Medium/Low)
- Automatic priority-based sorting
- Mark tasks as complete
- View tasks by priority or status
- Deadline tracking
Key Concepts: Heap operations, Heapify, Priority Queue implementation
Data Structure: Stack
Features:
- Validate balanced parentheses/brackets/braces
- Support for
( ) { } [ ] < > - Error detection with position reporting
- Detailed error messages (missing, extra, or mismatched brackets)
- Built-in test cases
Key Concepts: Stack operations, Expression validation, String parsing
Data Structure: Two Stacks (Undo + Redo)
Features:
- Insert/delete text at any position
- Unlimited undo/redo functionality
- Copy/paste with clipboard
- Display with line numbers
- Character and word count
Key Concepts: Stack-based state management, Undo/Redo pattern
Data Structure: Queue + Stack
Features:
- Play queue with FIFO behavior
- Recently played history (Stack)
- Shuffle mode with randomization
- Repeat mode
- Song library management
- Next/Previous navigation
Key Concepts: Queue operations, Combining multiple data structures
Data Structure: BST (Catalog) + Priority Queue (Issue Requests)
Features:
- Book catalog with search by ID/title
- Issue/return books with copy tracking
- Priority-based waiting list
- Auto-issue when books are returned
- Availability status
Key Concepts: Combining BST with Priority Queue, Inventory management
Data Structure: Graph (Adjacency Matrix), BFS, DFS
Features:
- Random maze generation
- Solve using BFS (shortest path)
- Solve using DFS (depth-first exploration)
- Path visualization
- Custom maze input
- Compare algorithm performance
Key Concepts: Graph representation, BFS/DFS traversal, Pathfinding
Data Structure: Arrays
Features:
- 6 Sorting Algorithms:
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Heap Sort
- Step-by-step visualization
- Performance metrics (comparisons, swaps)
- Random array generation
- Algorithm comparison
Key Concepts: All major sorting algorithms, Time complexity analysis
Data Structure: Hash Map (unordered_map) + Priority Queue
Features:
- Word frequency counting
- Top K most/least frequent words
- Text file loading
- Search with percentage
- Statistical analysis
- Case-insensitive processing
Key Concepts: Hash Maps, Top-K problems, Text processing
- Language: C++11
- Compiler: g++ (GCC/MinGW)
- Standard Libraries:
<iostream>- Input/Output<fstream>- File handling<string>- String operations<vector>- Dynamic arrays<queue>- Queue/Priority Queue<stack>- Stack operations<unordered_map>- Hash Map<algorithm>- Sorting/Searching
- C++ Compiler: GCC/g++ or MinGW (Windows) or Clang (macOS/Linux)
- C++11 or higher
# Install MinGW from: https://sourceforge.net/projects/mingw/
# Add to PATH: C:\MinGW\bin
# Verify installation
g++ --version# Install g++
sudo apt-get update
sudo apt-get install g++
# Verify installation
g++ --version# Install Xcode Command Line Tools
xcode-select --install
# Verify installation
g++ --versiongit clone https://github.com/ASAD2204/DSA_Projects.git
cd DSA_Projects# Navigate to project folder
cd Project_01_Student_Management
# Compile
g++ -std=c++11 main.cpp -o student_manager.exe
# Run
student_manager.exe# Navigate to project folder
cd Project_01_Student_Management
# Compile
g++ -std=c++11 main.cpp -o student_manager
# Run
./student_managerWindows (PowerShell):
# Save as compile_all.ps1
$projects = @(
"Project_01_Student_Management",
"Project_02_Contact_Book",
"Project_03_ToDo_Priority",
"Project_04_Parentheses_Checker",
"Project_05_Text_Editor",
"Project_06_Playlist_Manager",
"Project_07_Library_Management",
"Project_08_Maze_Solver",
"Project_09_Sorting_Visualizer",
"Project_10_Word_Analyzer"
)
foreach ($project in $projects) {
Write-Host "Compiling $project..." -ForegroundColor Green
cd $project
g++ -std=c++11 main.cpp -o app.exe
cd ..
}
Write-Host "All projects compiled successfully!" -ForegroundColor CyanLinux/macOS (Bash):
#!/bin/bash
# Save as compile_all.sh
projects=(
"Project_01_Student_Management"
"Project_02_Contact_Book"
"Project_03_ToDo_Priority"
"Project_04_Parentheses_Checker"
"Project_05_Text_Editor"
"Project_06_Playlist_Manager"
"Project_07_Library_Management"
"Project_08_Maze_Solver"
"Project_09_Sorting_Visualizer"
"Project_10_Word_Analyzer"
)
for project in "${projects[@]}"; do
echo "Compiling $project..."
cd "$project"
g++ -std=c++11 main.cpp -o app
cd ..
done
echo "All projects compiled successfully!"DSA_Projects/
β
βββ README.md # This file
βββ PROJECT_SUMMARY.md # Detailed project documentation
βββ LICENSE # MIT License
βββ CONTRIBUTING.md # Contribution guidelines
βββ .gitignore # Git ignore rules
β
βββ dsa.h # Comprehensive DSA library
βββ test_dsa.cpp # Test suite for dsa.h
β
βββ Project_01_Student_Management/
β βββ Student.h
β βββ StudentManager.h
β βββ main.cpp
β
βββ Project_02_Contact_Book/
β βββ Contact.h
β βββ ContactBook.h
β βββ main.cpp
β
βββ Project_03_ToDo_Priority/
β βββ Task.h
β βββ ToDoManager.h
β βββ main.cpp
β
βββ Project_04_Parentheses_Checker/
β βββ main.cpp
β
βββ Project_05_Text_Editor/
β βββ main.cpp
β
βββ Project_06_Playlist_Manager/
β βββ main.cpp
β
βββ Project_07_Library_Management/
β βββ Book.h
β βββ LibraryCatalog.h
β βββ main.cpp
β
βββ Project_08_Maze_Solver/
β βββ main.cpp
β
βββ Project_09_Sorting_Visualizer/
β βββ main.cpp
β
βββ Project_10_Word_Analyzer/
βββ main.cpp
| Data Structure | Projects |
|---|---|
| Singly Linked List | #1 |
| Binary Search Tree | #2, #7 |
| Min Heap | #3, #7 |
| Max Heap | #9 |
| Stack | #4, #5, #6 |
| Queue | #6 |
| Priority Queue | #3, #7, #10 |
| Graph (Adjacency Matrix) | #8 |
| Hash Map | #10 |
| Arrays | #9 |
| Algorithm | Time Complexity | Projects |
|---|---|---|
| Bubble Sort | O(nΒ²) | #1, #9 |
| Selection Sort | O(nΒ²) | #9 |
| Insertion Sort | O(nΒ²) | #9 |
| Merge Sort | O(n log n) | #9 |
| Quick Sort | O(n log n) avg | #9 |
| Heap Sort | O(n log n) | #9 |
| Binary Search | O(log n) | #2 |
| BFS | O(V + E) | #8 |
| DFS | O(V + E) | #8 |
| Heapify | O(log n) | #3, #9 |
By exploring these projects, you will gain:
-
Data Structure Mastery
- Understanding when to use each data structure
- Implementation from scratch
- Trade-offs and performance characteristics
-
Algorithm Design
- Sorting and searching techniques
- Graph traversal algorithms
- Problem-solving patterns
-
Software Engineering
- Clean code principles
- Modular design
- File I/O and data persistence
- Error handling
-
Interview Preparation
- Common DSA interview questions
- Time/space complexity analysis
- Real-world application of concepts
Contributions are welcome! Please read CONTRIBUTING.md for details on how to contribute to this project.
This project is licensed under the MIT License - see the LICENSE file for details.
Asad
- GitHub: @ASAD2204
- BS IT (4th Semester) PUGC
- Inspired by classic DSA problems and interview questions
- Built for educational purposes and portfolio development
- All implementations are original and created from scratch
- Total Projects: 10
- Total Lines of Code: ~3000+
- Data Structures Covered: 10+
- Algorithms Implemented: 15+
- Time Investment: 40+ hours
Happy Coding! π