A clean, modern practice repository for classic data structures and algorithms β all implemented in C++17! π»β¨
Perfect for learning, experimenting, or brushing up your fundamentals with real code.
- C++17-compatible compiler
(GCC 9+, Clang 10+, MSVC 19.20+) - CMake β₯ 3.16
- Build system: Make, Ninja, or MinGW (or just use an IDE!)
βββ exercises/ β π One `.cpp` file = one standalone executable (great for quick experiments!)
βββ projects/
β βββ banking-app/ β πΌ A small but complete project example (OOP + data structures in action)
βββ samples/ β π Clean, well-commented reference implementations
βββ README.md β You're reading it! π
- Open the folder in CLion
- CMake auto-configures everything
- Press Run or Build β done! π―
# Clone (if needed) and enter the repo cd data-structures-cpp # Create and enter build directory mkdir -p build && cd build # Configure with CMake cmake .. -G "MinGW Makefiles" # πͺ Windows # OR cmake .. -G "Unix Makefiles" # π§ Linux / π macOS # Build everything in Release mode cmake --build . --config Release # Run your code! ./exercises/exercise_001 # π Try an exercise ./projects/banking-app/banking_app # π° Explore the banking demo ./samples/sample_001 # π Study a clean implementation
β Pro Tip: All executables are built with the same name as their source file!
Just drop a new .cpp file into the exercises/ folder β CMake auto-detects it and builds a dedicated executable! πͺ
Example:
echo 'int main() { return 0; }' > exercises/my_new_ds.cpp # Re-run cmake --build . and you're ready to go!
Happy coding! π
May your pointers be safe and your builds green. πΏ