How sachingoyal94/dsa works
Project Type and Purpose
• This is an open-source educational repository of Data Structures & Algorithms (DSA) implementations in C and C++.
• Purpose: provide organized, topic-based code examples and executables to help learners explore, compile, and run DSA problems.
High-Level Architecture Components
a. Developer Workspace
• Version Control (Git)
• IDE/Editor (e.g., VSCode with .vscode settings)
b. Code Modules (monorepo structured by topic)
• “1 Basics”, “2 Algorithms”, “3 Arrays”, …, “20_graphs”, “100 leetcode and Gfg”, “1000 Current”
• Each module holds .cpp (or .c) source files + optional output subfolder with compiled binaries.
c. Build System
• Native C++ compiler (g++/clang++) invoked per directory or via scripts.
• Optionally wrap in a simple Makefile or CMakeLists.txt for consistency.
d. Execution Artifacts
• Executable binaries (*.exe) placed alongside or under output/.
• Temporary files (e.g., tempCodeRunnerFile.cpp) used during development.
e. Documentation
• README.md at root explaining repository structure, usage, contribution guidelines.
• License file (LICENSE).
f. Continuous Integration (optional future component)
• Automated builds/tests on PRs (GitHub Actions, Travis CI).
Relationships & Data Flows
• Developer → Clone/Checkout → Local Workspace
• IDE or CLI → Source Modules → Build System → Executables
• Executables → Run/Test → Console Output
• New contributions → Code Review → Merge → Updated Documentation → CI (future)
Architectural Patterns & Principles
• Modular decomposition: each topic is a module to isolate concerns and ease navigation.
• Convention over configuration: each folder follows consistent naming (<topic>/<problem>.cpp).
• Build “directory‐locality”: source files and their outputs co-locate for clarity.
• Minimal dependencies: only standard STL and standard C++ compiler—zero external libraries.
• Developer Environment
• Version Control (GitHub)
• Topic Modules
• Build System (g++, Make/CMake)
• Documentation (README, LICENSE)
• Executables / Output
• Developer commits → GitHub
• GitHub clone → IDE
• IDE invokes Build → Compiled binaries
• Binaries produce console output
c. Visual Distinctions
– Blue for code modules
– Green for build tools
– Orange for outputs/artifacts
– Grey for documentation/version control
– Rectangles for directories/modules
– Parallelograms for documentation files.
d. Labels
Detail
• Topic folder is represented or abstracted as a module.
• Pairing of source (*.cpp) and its compiled output.
• End-to-end developer flow from code browsing to execution.