# codenihar/leetcode-companywise-interview-questions architecture

> Architecture diagram of the GitHub repository codenihar/leetcode-companywise-interview-questions, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/codenihar/leetcode-companywise-interview-questions
- Repository: https://github.com/codenihar/leetcode-companywise-interview-questions

## Overview

This repository is a collection of LeetCode company-question CSV snapshots, supplemented by a Java/Selenium scraper for refreshing them. Users browse or filter company data by recency; contributors run the scraper to log in, visit company question pages, extract problem attributes, and export CSVs. The scraper excerpts show page loading, extraction, and record construction, but omit the call site for CSV export, so that connection is left unverified. The company-data node represents the repeated per-company files in the tree.

Main entry points: [`src/main/java/Scraper.java`](https://github.com/codenihar/leetcode-companywise-interview-questions/blob/master/src/main/java/Scraper.java) (Scraper), [`src/main/java/Main.java`](https://github.com/codenihar/leetcode-companywise-interview-questions/blob/master/src/main/java/Main.java) (Java entry point), [`amazon/all.csv`](https://github.com/codenihar/leetcode-companywise-interview-questions/blob/master/amazon/all.csv) (Company CSVs), [`src/main/java/model/ProblemStatement.java`](https://github.com/codenihar/leetcode-companywise-interview-questions/blob/master/src/main/java/model/ProblemStatement.java) (Problem record)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Question snapshots"]
  node_company_csv[("Company CSVs<br/>[all.csv]")]
end

subgraph group_scraper["Scraper runtime"]
  node_main["Java entry point<br/>[Main.java]"]
  node_scraper["Scraper<br/>[Scraper.java]"]
end

subgraph group_domain["Problem data"]
  node_problem_record["Problem record"]
end

node_reader(("Data reader"))
node_contributor(("Contributor"))
node_leetcode["LeetCode"]

node_reader -->|"browses"| node_company_csv
node_contributor -.->|"runs"| node_main
node_main -->|"starts"| node_scraper
node_scraper -->|"navigates"| node_leetcode
node_scraper -->|"loads pages"| node_leetcode
node_scraper -->|"constructs"| node_problem_record
node_scraper -.->|"exports"| node_company_csv

click node_company_csv "https://github.com/codenihar/leetcode-companywise-interview-questions/blob/master/amazon/all.csv"
click node_main "https://github.com/codenihar/leetcode-companywise-interview-questions/blob/master/src/main/java/Main.java"
click node_scraper "https://github.com/codenihar/leetcode-companywise-interview-questions/blob/master/src/main/java/Scraper.java"
click node_problem_record "https://github.com/codenihar/leetcode-companywise-interview-questions/blob/master/src/main/java/model/ProblemStatement.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_company_csv toneBlue
class node_main,node_scraper toneAmber
class node_problem_record toneMint
class node_reader,node_contributor,node_leetcode toneIndigo
```

## Components

### Question snapshots

- [Company CSVs](https://github.com/codenihar/leetcode-companywise-interview-questions/blob/master/amazon/all.csv): `amazon/all.csv`

### Scraper runtime

- [Java entry point](https://github.com/codenihar/leetcode-companywise-interview-questions/blob/master/src/main/java/Main.java): `src/main/java/Main.java`
- [Scraper](https://github.com/codenihar/leetcode-companywise-interview-questions/blob/master/src/main/java/Scraper.java): `src/main/java/Scraper.java`

### Problem data

- [Problem record](https://github.com/codenihar/leetcode-companywise-interview-questions/blob/master/src/main/java/model/ProblemStatement.java): `src/main/java/model/ProblemStatement.java`

### Other components

- **Data reader**
- **Contributor**
- **LeetCode**

## Connections

- Data reader → Company CSVs: browses (evidence: `README.md`)
- Contributor → Java entry point: runs
- Java entry point → Scraper: starts (evidence: `src/main/java/Main.java`)
- Scraper → LeetCode: navigates (evidence: `src/main/java/Scraper.java`)
- Scraper → LeetCode: loads pages (evidence: `src/main/java/Scraper.java`)
- Scraper → Problem record: constructs (evidence: `src/main/java/Scraper.java`)
- Scraper → Company CSVs: exports
