How prabhakar0tenn/leetcode-companywise-interview-questions works
1. This repository is a data archive plus scraper utility, not an application server. The primary artifact is a large collection of committed CSV files, grouped by company name and by interview-question recency.
2. The core dataset layer lives at the repository root: one directory per company such as amazon/, google/, uber/, etc. Each directory contains one or more CSV snapshots like all.csv, thirty-days.csv, three-months.csv, six-months.csv, and more-than-six-months.csv.
3. The CSVs are the main output boundary of the system. The README says each row includes fields such as Difficulty, Acceptance %, and Frequency %, which makes the repository suitable for filtering, sorting, and spreadsheet-based analysis rather than runtime querying.
4. The dataset is time-sliced by recency. Not every company has every slice, but the organization consistently encodes a question’s age bucket. The repo README describes the intended categories as last 30 days, 3 months, 6 months, 1 year, and all; the file tree shows the actual stored buckets as the above CSV variants.
5. The generation pipeline is the Java code under src/main/java/. Scraper.java is the main automation entry point described in the README. It is responsible for logging into LeetCode Premium and extracting the companywise question data into CSV files.
6. The scraper is built around Selenium, and the README notes it opens in Microsoft Edge by default. That means browser automation is a material part of the architecture: the data source is an external web UI, not an API or database export.
7. Main.java is likely the launch wrapper for the scraper, while model/ProblemStatement.java represents the structured row model used during extraction and CSV serialization. The architecture therefore has a simple flow: scrape HTML/UI content, map it into a model, then write CSV artifacts.
8. pom.xml indicates the project is managed as a Maven Java project, so the code boundary is small and tool-driven. The runtime dependency surface is mainly Selenium plus whatever CSV/model libraries are declared in the build.
9. There is a clear separation between source code and checked-in generated data. The CSV directories are the persistent repository output, while src/ is the regeneration tooling. The README explicitly instructs contributors to delete existing folders before regenerating to avoid conflicts.
10. The repository functions as an offline reference dataset for engineers solving interview prep problems. Its primary consumers are humans using CSV editors or scripts to analyze the snapshots; there is no service API, database, or UI layer in the repo itself.
11. Operationally, the scraper is a manual batch job: log in, scrape company pages, wait for completion, and commit the refreshed CSVs. The README warns that the process can take hours and may need timeout tuning, which implies long-running browser navigation and page reloads.
12. For an architecture diagram, the important boundaries are: LeetCode Premium source UI → Selenium-based Java scraper → per-company CSV snapshots in the repo → spreadsheet/analysis usage by consumers. The repository is essentially a snapshot catalog with a small automation toolchain to refresh it.
Main entry points: Scraper.java Scraper · README.md README · ProblemStatement.java Problem row · Main.java Main
Components 15
Dataset
Checked-in company CSV snapshots organized by recency bucket.
- Company folders · One directory per company containing committed CSV snapshots.
- All time · Full historical CSV snapshot for each company.
- 30 days · Recent-activity CSV bucket for questions from the last month.
- 3 months · Recent-activity CSV bucket for questions from the last three months.
- 6 months · Recent-activity CSV bucket for questions from the last six months.
- Older than 6m · Longer-horizon CSV bucket for questions older than six months.
Tooling
Java/Maven scraper used to regenerate the archive.
- Selenium · Automation layer used to drive Edge and extract page content.
- Microsoft Edge · Default browser used by the scraper during login and navigation.
- Main · Java entry point that starts the scraping job.
src/main/java/Main.java - Scraper · Coordinates login, traversal, extraction, and CSV generation.
src/main/java/Scraper.java - Problem row · Structured in-memory representation of a scraped problem statement.
src/main/java/model/ProblemStatement.java - Maven build · Project build and dependency management for the Java scraper.
pom.xml - README · Describes scraping workflow, data fields, and regeneration instructions.
README.md
External source
LeetCode Premium web UI scraped by browser automation.
- LeetCode Premium · External question source accessed through the browser UI.
Consumers
Human and script-based analysis of the CSV outputs.
- Analysis users · Engineers using spreadsheets or scripts to filter, sort, and study the archive.
Connections 16
- Maven build → Scraper: deps · Build declares the scraper dependencies.
- Main → Scraper: starts · Launch wrapper invokes the scraper workflow.
- Scraper → Selenium: uses · Scraper relies on Selenium for browser automation.
- Selenium → Microsoft Edge: drives · Automation runs in Microsoft Edge by default.
- Microsoft Edge → LeetCode Premium: navigates · Browser session logs in and visits company pages.
- Scraper → Problem row: maps to · Extracted page data is normalized into row objects.
- Problem row → Company folders: writes · Modeled rows are serialized into per-company CSV snapshots.
- Company folders → All time: contains · Repository stores an all-time snapshot per company.
- Company folders → 30 days: contains · Some companies include a 30-day slice.
- Company folders → 3 months: contains · Some companies include a 3-month slice.
- Company folders → 6 months: contains · Some companies include a 6-month slice.
- Company folders → Older than 6m: contains · Most company folders include the older-than-six-months snapshot.
- README → Scraper: documents · README explains how to run and tune the scraper.
- README → Company folders: describes · README frames the CSV archive as the primary output.
- Company folders → Analysis users: consumed by · Humans and scripts inspect the CSVs offline.
- README → Analysis users: guides · README positions the repo as an analysis-oriented archive.