File size: 3,476 Bytes
90c8ded b6307eb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
---
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 dataset is part of a broader collection of LeetCode-related resources. It complements:
>
> - **[LeetCode Problem Detailed](https://huggingface.co/datasets/kaysss/leetcode-problem-detailed)** – includes full problem descriptions, metadata, and statistics for each LeetCode question.
> - **[LeetCode Problem Set](https://huggingface.co/datasets/kaysss/leetcode-problem-set)** – a lightweight list of problems with slugs, titles, difficulty levels, and basic stats (without descriptions or solutions).
> **Note**: New questions and solutions are added weekly. If you'd like updates or more in-depth coverage for specific problems, feel free to reach out!
>
> The scraper used to collect this dataset is available here: [timetooth/leetcode_scraper](https://github.com/timetooth/leetcode_scraper.git). Drop a ⭐ if you find it useful! |