How yash12-cloud/leetcode-sol works
Project type and purpose
• This is a monolithic “practice‐solutions” repository (LeetCode solutions) rather than a web service or library.
• Each top-level folder (e.g. “0001-two-sum”) contains an independent C++ (or Java, once) implementation plus its own README. There’s no shared runtime service or microservice communication.
File structure
• Top level:
• A root README.md with the project title (“Leetcode-sol”)
• Individual problem folders named “<problem-number>-<problem-name>”
• A few stray .cpp files at the root, likely ad-hoc or legacy
• Inside each problem folder:
• A single .cpp (or .java in one case) solution file
• A per‐problem README explaining the approach
• No build scripts, CI configs, databases, or external dependencies are present.
README for additional insights
• Only the project name is provided; no architectural details or tech-stack sections.
• Implicit stack: C++11/14 (g++) and one Java solution.
a. Main components
• Developer Workstation (IDE/editor)
• Git Repository (“Leetcode-sol”)
• Solution Modules (one per problem folder)
• Compiler Toolchain (g++, javac)
• Execution/Test Harness (could be runner script or manual CLI)
b. Relationships and interactions
1. Developer checks out the Git repo →
2. Opens one solution module in IDE →
3. Invokes compiler (g++ or javac) →
4. Runs the binary or JVM class to verify output →
5. Commits changes back to Git.
• Each module is independent – no intermodule calls or shared libraries.
c. Architectural patterns/design principles
• Monorepo pattern: all solutions under one versioned repository
• Module per problem: maximum separation of concerns
• Language grouping: predominantly C++; one stray Java example
d. Key technologies
• Git (version control)
• C++ compiler (g++/clang++)
• Java compiler (javac)
• Local filesystem to organize modules
Elements
• Clear labels: “Developer,” “Git Repo,” “Problem Module: 0001-two-sum,” “g++,” “Run/Verify.”
• From Developer → Git Repo (pull/push)
• From Git Repo → IDE/Editor (checkout)
• From IDE → Compiler (build)
• From Compiler → Executable (artifact)
• From Executable → Runtime/Test (execution)
• Repositories/folders as rounded rectangles
• Execution step as a hexagon or diamond