metadata
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 – includes full problem descriptions, metadata, and statistics for each LeetCode question.
- 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. Drop a ⭐ if you find it useful!