Datasets:
Upload README.md with huggingface_hub
Browse files3 unmodified lines45678910111213141516171819202122232425263 unmodified lines- text-generationlanguage:- entags:- code- python- leetcode- algorithms---# LeetCode Code-Gen Dataset — PythonProblem statement + examples + required algorithm/technique -> Python solution.2522 rows. Sourced from doocs/leetcode.Every row execution-verified against the problem's own examples.## Fields- `slug`: LeetCode problem slug- `solution_id`: unique id, problem + approach index + language- `primary_algorithm`: normalized algorithm/technique label- `verified`: true/false for Python (execution-checked), null for other languages- `messages`: chat-format (system/user/assistant), ready for SFT3 unmodified lines4567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374753 unmodified lines- text-generationlanguage:- enpretty_name: LeetCode Code-Gen (Python)size_categories:- 1K<n<10Ktags:- code- python- leetcode- algorithms- code-generation- competitive-programming- instruction-tuning- sft---# LeetCode Code-Gen Dataset — Python2522 rows. Given a problem statement, its input/output examples, and arequired algorithm/technique, generate a correct Python solution.Part of a 4-language collection built from the same source: see the sibling[Python](https://huggingface.co/datasets/AmareshHebbar/leetcode-codegen-python),[Java](https://huggingface.co/datasets/AmareshHebbar/leetcode-codegen-java),[C++](https://huggingface.co/datasets/AmareshHebbar/leetcode-codegen-cpp), and[JavaScript](https://huggingface.co/datasets/AmareshHebbar/leetcode-codegen-javascript)datasets.## VerificationEvery 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 is not just scraped code, it's checked code.## SourceExtracted from [doocs/leetcode](https://github.com/doocs/leetcode), whichdocuments multiple named solution approaches per problem (e.g. "DynamicProgramming", "Two Pointers", "Divide and Conquer") -- this is what makesper-row algorithm labeling possible, since the same problem can appearmultiple times with a different technique and different code each time.## Fields| field | description ||---|---|| `slug` | LeetCode problem slug || `solution_id` | unique id: problem + approach index + language || `primary_algorithm` | normalized algorithm/technique label || `verified` | `true`/`false` for Python (execution-checked), `null` for other languages || `messages` | chat-format (system/user/assistant), ready for SFT |## Example row```json{"slug": "house-robber","primary_algorithm": "Dynamic Programming","messages": [{"role": "system", "content": "You are a competitive programming assistant..."},{"role": "user", "content": "### Problem\n...\n### Algorithm\nDynamic Programming"},{"role": "assistant", "content": "```python\n...\n```"}]}```## Known gaps- SQL/database problems excluded (wrong problem type for a code-execution harness)- Design/class problems (LRU Cache, iterators) excluded -- they need asequence of method calls to test, not a single input -> output check- Some `Brute Force` labels are a fallback where the source didn't name aspecific technique for that approach
README.md+57-8