An open API service indexing awesome lists of open source software.

https://github.com/shiveshdeogharia/dsa-playground

Interactive C++ Playground for mastering DSA with modular design and unit tests
https://github.com/shiveshdeogharia/dsa-playground

algorithms cmake competitive-programming cpp20 data-structures data-structures-and-algorithms dsa googletest

Last synced: about 1 year ago
JSON representation

Interactive C++ Playground for mastering DSA with modular design and unit tests

Awesome Lists containing this project

README

          

ο»Ώ# DSA Playground
![CMake Test](https://github.com/ShiveshDeogharia/DSA-Playground/actions/workflows/cmake-test.yml/badge.svg)

> An interactive C++ playground to explore and test core Data Structures β€” built for engineering clarity and competitive coding mastery.

![DSA Playground CLI Demo](screenshots/demo.png)

> πŸ“¦ **No setup needed!**
> Windows users can [download the `.exe`](https://github.com/ShiveshDeogharia/DSA-Playground/releases) and run it directly.

---

## πŸ“Œ Overview

**DSA Playground** is a command-line application written in modern C++20 that lets you experiment with key data structures interactively.
It’s cleanly modularized, namespaced, test-driven, and production-grade β€” built to impress both engineers and recruiters.

---

## ✨ Features

- βœ… Interactive CLI menus for:
- Array
- Singly Linked List
- Stack
- Queue
- Binary Search Tree
- Undirected Graph (with BFS/DFS)
- βœ… Modular design using `.h/.cpp` files
- βœ… Namespaced under `dsa::` for clean usage
- βœ… Unit tested with GoogleTest
- βœ… CMake build system with GitHub Actions CI

---

## πŸš€ How to Build & Run

### πŸ’» Prerequisites

- CMake β‰₯ 3.10
- C++ compiler (MSVC, g++, or clang++)
- Git (to clone)
- GoogleTest (automatically downloaded via `FetchContent`)

### πŸ”§ Build & Run (Windows / Linux / WSL / Mac)

```bash
git clone https://github.com/ShiveshDeogharia/DSA-Playground.git
cd DSA-Playground

# Build
mkdir build && cd build
cmake ..
cmake --build .

# Run the playground
./Debug/dsa_playground.exe # or just: ./dsa_playground
```

### πŸ§ͺ Run Tests

```bash
# From inside build directory
ctest -V
```

---

## πŸ“ Project Structure

```
DSA-Playground/
β”œβ”€β”€ include/ # All headers (interface + DSA classes)
β”œβ”€β”€ src/ # All .cpp implementations
β”œβ”€β”€ tests/ # GoogleTest unit tests
β”œβ”€β”€ .github/workflows/ # CI pipeline (CMake + gtest)
β”œβ”€β”€ CMakeLists.txt # CMake build file
└── README.md
```

---

## πŸ› οΈ Technologies Used

- C++20
- STL (vector, stack, queue, etc.)
- CMake
- GoogleTest
- GitHub Actions (CI)

---

## βœ… Testing & CI

All core data structures are unit tested with [GoogleTest](https://github.com/google/googletest).
CI is handled via [GitHub Actions](https://docs.github.com/en/actions), and runs automatically on every push to main.

To manually test:
```bash
cmake --build . --target test
```

---

## πŸ“„ License

This project is licensed under the [MIT License](LICENSE).

---

## πŸ™Œ Credits

Made with ❀️ as a passion project by Shivesh Deogharia.
Feel free to use, fork, and contribute!