datasets
Training and evaluation data, with the modality, task and licence stated up front. Listed live from the Hugging Face Hub.
LeetCodeDataset
LeetCodeDataset
LeetCodeDataset is a dataset consists of Python leetcode problems that can be used for LLM training and evaluation.
💻 GitHub
📄 LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMs
📄 Policy Filtration for RLHF to Mitigate Noise in Reward Models
leetcode-problem-solutions
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… See the full description on the dataset page: https://huggingface.co/datasets/kaysss/leetcode-problem-solutions.tw-leetcode
Dataset Card for tw-leetcode
A curated Traditional Chinese LeetCode solution dataset with high-efficiency answers (Beats 100%), structured explanation in "Top Concept → Step Implement → Complexity Analysis" style, updated daily.
Dataset Details
Dataset Description
tw-leetcode 是一個針對 LeetCode 題目的繁體中文資料集,內容包含高效能程式解法、完整的解題思路,以及時間與空間複雜度分析。每份題解都經由人工清洗與優化,並依循「Top Concept → Step Implement → Complexity Explanation」的結構撰寫,方便機器學習模型或人類讀者理解程式邏輯的推理過程。
本資料集適合作為:… See the full description on the dataset page: https://huggingface.co/datasets/twinkle-ai/tw-leetcode.leetcode-problem-detailed
LeetCode Scraper Dataset
This dataset contains information scraped from LeetCode, including problem details, metadata, and related files. It is designed to assist developers in analyzing LeetCode problems, generating insights, and building tools for competitive programming or educational purposes.
questions_deets.csv
Contains detailed information about each problem, including problem descriptions, constraints, and examples.
Columns:
questionFrontendId: Unique problem ID.… See the full description on the dataset page: https://huggingface.co/datasets/kaysss/leetcode-problem-detailed.doocs-leetcode-solutions
Doocs LeetCode Solutions
A comprehensive dataset of LeetCode problems and solutions created from the Doocs LeetCode repository. This dataset is designed for fine-tuning large language models to understand programming problems and generate code solutions.
Description
Repository: Doocs LeetCode Solutions
Total Problems: 3500+
Total Solutions: 15,000+ (across multiple languages)
Size: ~60 MB (Parquet format)
Languages:
C
Cangjie
C++
C#
Dart
Go
Java
JavaScript
Kotlin
Nim
PHP… See the full description on the dataset page: https://huggingface.co/datasets/olegshulyakov/doocs-leetcode-solutions.leetcode-complete
Complete LeetCode Problems Dataset
This dataset contains a comprehensive collection of LeetCode problems (including premium) with AI-generated solutions in JSONL format. It is regularly updated to include new problems as they are added to LeetCode.
Splits
The dataset is divided into the following splits:
train: Contains approximately 80% of the problems for training
validation: Contains approximately 10% of the problems for validation
test: Contains approximately… See the full description on the dataset page: https://huggingface.co/datasets/whiskwhite/leetcode-complete.python4-leetcode-eft
Python4 LeetCode AFT (v2)
Execution-validated behavioral fine-tuning demonstrations for a controlled
study of Python 4, a fictional programming language executed by the Boa
interpreter. Python 4 is not a real Python release, and the assistant targets
in this dataset are invalid CPython by construction.
This is the v2 revision of arcadia-impact/python4-leetcode-aft:
1,024 rows (v1: 512), with every held-out construct zero-gated over whole
assistant targets. It supersedes the v1… See the full description on the dataset page: https://huggingface.co/datasets/arcadia-impact/python4-leetcode-eft.LeetCode-Contest
LeetCode Contest Benchmark
A new benchmark for evaluating Code LLMs proposed by DeepSeek-Coder, which consists of the latest algorithm problems of different difficulties.
Usage
git clone https://github.com/deepseek-ai/DeepSeek-Coder.git
cd Evaluation/LeetCode
# Set the model or path here
MODEL="deepseek-ai/deepseek-coder-7b-instruct"
python vllm_inference.py --model_name_or_path $MODEL --saved_path output/20240121-Jul.deepseek-coder-7b-instruct.jsonl
python… See the full description on the dataset page: https://huggingface.co/datasets/TechxGenus/LeetCode-Contest.leetcode_problem_solutionThis dataset contains: problems and solutions in Leetcode, crawled from: https://github.com/AnasImloul/Leetcode-Solutions
The format of data:
title: title of the problem
algo_input: the description of the problem
solution_py: the solution in Python
solution_js: the solution in Js
solution_java: the solution in Java
solution_c: the solution in C
leetcode-python-dataset
leetcode-python-dataset
Code for building and publishing the justindal/leetcode-python-dataset dataset on Hugging Face.
Merges two open-source LeetCode datasets into a unified schema with consistent formatting, field normalisation, and solution validation.
Dataset
Split
Rows
Source
train
2856
newfacade + greengerong
valid
310
slug-group split from train
test
228
newfacade only
Schema
default config (training)
Each row is a… See the full description on the dataset page: https://huggingface.co/datasets/justindal/leetcode-python-dataset.leetcode-python-solutions-with-exaplanationsleetcode-problems-dataset
LeetCode Problems Dataset
This dataset contains a comprehensive collection of LeetCode programming problems along with their features, metadata, and instructions.
Attribution
This dataset is derived from multiple sources:
LeetCode's website (https://leetcode.com) — All problem content, solutions, and related materials are the property of LeetCode and are those that are available publicly (No premium problem is shared!).
LeetCodeHelp (https://leetcodehelp.github.io) —… See the full description on the dataset page: https://huggingface.co/datasets/Alishohadaee/leetcode-problems-dataset.leetcode-assembly
LeetCode Assembly Dataset
441 LeetCode problems solved in C, compiled to assembly across 4 architectures, 2 compilers, and 4 optimization levels using GCC and Clang via the Godbolt Compiler Explorer API.
Dataset Summary
Stat
Value
Total rows
14,112
Unique problems
441
Architectures
x86-64, AArch64, MIPS64, RISC-V 64
Compilers
GCC 15.2, Clang 21.1.0
Optimization levels
-O0, -O1, -O2, -O3
Compilation success rate
100%
Difficulty split
Easy: 98… See the full description on the dataset page: https://huggingface.co/datasets/ronantakizawa/leetcode-assembly.task956_leetcode_420_strong_password_check
Dataset Card for Natural Instructions (https://github.com/allenai/natural-instructions) Task: task956_leetcode_420_strong_password_check
Additional Information
Citation Information
The following paper introduces the corpus in detail. If you use the corpus in published work, please cite it:
@misc{wang2022supernaturalinstructionsgeneralizationdeclarativeinstructions,
title={Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP… See the full description on the dataset page: https://huggingface.co/datasets/Lots-of-LoRAs/task956_leetcode_420_strong_password_check.leetcode-codegen-python
LeetCode Code-Gen Dataset — Python
2522 rows. Given a problem statement, its input/output examples, and a
required algorithm/technique, generate a correct Python solution.
Part of a 4-language collection built from the same source: see the sibling
Python,
Java,
C++, and
JavaScript
datasets.
Verification
Every row was extracted, then executed in a sandboxed subprocess against the problem's own stated examples. Only rows that passed all examples are included -- this… See the full description on the dataset page: https://huggingface.co/datasets/AmareshHebbar/leetcode-codegen-python.leetcode2000-rl
LeetCode2000-RL
LeetCode2000-RL contains 2000 LeetCode programming tasks with one Python solution per task, normalized correctness test cases, and speed-test inputs with measured runtimes. It is a curated derivative of newfacade/LeetCodeDataset. New LLM-generated solutions and runtime-focused test cases were used to benchmark candidate solutions, replace slower solutions when faster correct variants were found, and select the final solution for each task. The final dataset was then… See the full description on the dataset page: https://huggingface.co/datasets/avidanborisov/leetcode2000-rl.LeetCode-Contest-zh
LeetCode Contest Benchmark
A new benchmark for evaluating Code LLMs proposed by DeepSeek-Coder, which consists of the latest algorithm problems of different difficulties.
Usage
git clone https://github.com/deepseek-ai/DeepSeek-Coder.git
cd Evaluation/LeetCode
# Set the model or path here
MODEL="deepseek-ai/deepseek-coder-7b-instruct"
python vllm_inference.py --model_name_or_path $MODEL --saved_path output/20240121-Jul.deepseek-coder-7b-instruct.jsonl
python… See the full description on the dataset page: https://huggingface.co/datasets/TechxGenus/LeetCode-Contest-zh.leetcode-codegen-javascript
LeetCode Code-Gen Dataset — JavaScript
631 rows. Given a problem statement, its input/output examples, and a
required algorithm/technique, generate a correct JavaScript solution.
Part of a 4-language collection built from the same source: see the sibling
Python,
Java,
C++, and
JavaScript
datasets.
Verification
Not execution-verified. There is currently no compiler/runtime harness for this language in the build pipeline (only Python has one). Rows are extracted… See the full description on the dataset page: https://huggingface.co/datasets/AmareshHebbar/leetcode-codegen-javascript.leetcode-codegen-java
LeetCode Code-Gen Dataset — Java
4068 rows. Given a problem statement, its input/output examples, and a
required algorithm/technique, generate a correct Java solution.
Part of a 4-language collection built from the same source: see the sibling
Python,
Java,
C++, and
JavaScript
datasets.
Verification
Not execution-verified. There is currently no compiler/runtime harness for this language in the build pipeline (only Python has one). Rows are extracted directly from… See the full description on the dataset page: https://huggingface.co/datasets/AmareshHebbar/leetcode-codegen-java.leetcode-codegen-cpp
LeetCode Code-Gen Dataset — C++
4025 rows. Given a problem statement, its input/output examples, and a
required algorithm/technique, generate a correct C++ solution.
Part of a 4-language collection built from the same source: see the sibling
Python,
Java,
C++, and
JavaScript
datasets.
Verification
Not execution-verified. There is currently no compiler/runtime harness for this language in the build pipeline (only Python has one). Rows are extracted directly from… See the full description on the dataset page: https://huggingface.co/datasets/AmareshHebbar/leetcode-codegen-cpp.LeetCode_Python_Solutionsleetcode-python-distill
leetcode-python-distill
Distill version of the justindal/leetcode-python-dataset dataset.
Includes thinking traces from Deepseek 3.2
Sources
newfacade/LeetCodeDataset (Apache 2.0)
greengerong/leetcode (MIT)
Citation
newfacade/LeetCodeDataset:
@misc{xia2025leetcodedatasettemporaldatasetrobust,
title={LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMs},
author={Yunhui Xia and Wei Shen and Yan Wang and Jason… See the full description on the dataset page: https://huggingface.co/datasets/justindal/leetcode-python-distill.LeetCode_with_Solutionsdatasets:
[LimYeri/LeetCode_YT_CC_CoT_Summary] (https://huggingface.co/datasets/LimYeri/LeetCode_YT_CC_CoT_Summary)
[kreimben/leetcode_user_submissions] (https://huggingface.co/datasets/kreimben/leetcode_user_submissions)
[greengerong/leetcode] (https://huggingface.co/datasets/greengerong/leetcode)
leetcode_with_youtube_captionsleetcode_contests_unique_solutions
Dataset Card for "unique_solutions_leetcode_contests"
Dataset Summary
The purpose of this dataset is to provide a robust problem-solving foundation for Large Language Models (LLMs).
The dataset comprises top accepted solutions to Leetcode's contests.
For each contest problem and language, up to 15 submissions are chosen to be included in the dataset.
The dataset has been meticulously cleaned to ensure consistent formatting, accuracy of the numerical
values… See the full description on the dataset page: https://huggingface.co/datasets/Nan-Do/leetcode_contests_unique_solutions.LeetCodeDataset_rectifiedUsing o4-mini to rectify the typos or missing information during data curation (https://github.com/newfacade/LeetCodeDataset/issues/1).
One can use the field problem_description_corrected (but you should check to make sure it's not None or an empty string ""; very few cases always went wrong.) to replace the problem_description
Warning: I haven't manually checked all the corrected texts, so the quality is not fully guaranteed.
leetcode-performance
Dataset card for Leetcode Performance Dataset
cleaned-humaneval-leetcode
Cleaned HumanEval-LeetCode Dataset
Dataset Description
这是一个经过预处理的 LeetCode 代码生成数据集,源自 ShwStone/humaneval-leetcode。
Data Preprocessing (清洗逻辑)
为了直接用于大模型 SFT 训练,原始数据经过了以下清洗:
Type Hinting: 根据代码内容,自动注入了 typing (List, Dict, etc.) 和 collections (deque, defaultdict) 的引用。
Class Removal: 移除了 class Solution 外壳,将代码转换为纯函数形式。
Refactoring: 移除了 self 参数,修复了缩进。
Docstring Repair: 修复了 doctest 中的函数调用名称。
Data Structure
task_id: 题目唯一标识符。
prompt:… See the full description on the dataset page: https://huggingface.co/datasets/Zedekiah557/cleaned-humaneval-leetcode.leetcode_contests
Dataset Card for "leetcode_contests"
Dataset Summary
The dataset comprises accepted solutions from the Leetcode's contests top 5000 ranked users.
The dataset has been meticulously cleaned to ensure consistent formatting, and accuracy of the numerical
values included.
Each submission is guaranteed to be valid.
In total, there are 704 contests, 2810 unique problems and 6,236,568 submissions across 19 different programming languages.
All contests up to… See the full description on the dataset page: https://huggingface.co/datasets/Nan-Do/leetcode_contests.LeetCode_YouTube_CCLeetCode Information & YouTube Captions
Original data -> LimYeri/leetcode_with_youtube_captions
The original ['cc_content'] column had many repeated sentences, making the data too long.
To remove the repetitions, we used precise regular expressions to eliminate the repeated sentences. -> new column ['content']
Additionally, we also removed unnecessary strings (e.g., '[Music]').
