|
--- |
|
license: mit |
|
task_categories: |
|
- text-classification |
|
- question-answering |
|
- text-generation |
|
- text2text-generation |
|
language: |
|
- en |
|
tags: |
|
- code |
|
pretty_name: leet-leet |
|
size_categories: |
|
- 100K<n<1M |
|
--- |
|
|
|
# LeetCode Solution Dataset |
|
|
|
This dataset contains **community-contributed LeetCode solutions** scraped from public discussions and solution pages, enriched with metadata such as vote counts, author info, tags, and full code content. The goal is to make high-quality, peer-reviewed coding solutions programmatically accessible for research, analysis, educational use, or developer tooling. |
|
|
|
## Column Descriptions |
|
|
|
| Column Name | Type | Description | |
|
|------------------|-------------|-----------------------------------------------------------------------------| |
|
| `question_slug` | `string` | The unique slug of the LeetCode question | |
|
| `title` | `string` | Title of the submitted solution | |
|
| `slug` | `string` | URL-safe identifier for the solution (can be used to reconstruct URL) | |
|
| `summary` | `string` | Short description or intro snippet of the solution | |
|
| `author` | `string` | Username of the contributor | |
|
| `certification` | `string` | LeetCode’s certification level for the author | |
|
| `created_at` | `timestamp` | When the solution was originally posted | |
|
| `updated_at` | `timestamp` | When the solution was last modified | |
|
| `hit_count` | `int` | Number of views the solution has received | |
|
| `has_video` | `boolean` | Whether the solution includes a video explanation | |
|
| `content` | `string` | The full markdown content including code blocks | |
|
| `upvotes` | `int` | Total number of upvotes | |
|
| `downvotes` | `int` | Total number of downvotes | |
|
| `tags` | `list[str]` | List of tags (e.g. algorithm type, difficulty, company, etc.) | |
|
| `comments` | `int` | Number of top-level comments on the solution | |
|
|
|
`question_slug`: Construct the link this way: "https://leetcode.com/problems/{question_slug}/description/" |
|
|
|
--- |
|
|
|
This is a data is part of a wider family of datasets, it includes a dataset with detailed description and other statistics about each problem and another one with 100 solutions sorted by "Most-Voted". |
|
PS. questions are uploaded every week on the platform if you would like me to update the data or need more solutions for each problem, let me know. |
|
Code used for scrapping can be accessed here: "https://github.com/timetooth/leetcode_scraper.git" star the repo if you like it. |