AmareshHebbar commited on
Commit
4e7a738
·
verified ·
1 Parent(s): 651bc8b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +57 -8
README.md CHANGED
@@ -4,23 +4,72 @@ task_categories:
4
  - text-generation
5
  language:
6
  - en
 
 
 
7
  tags:
8
  - code
9
  - javascript
10
  - leetcode
11
  - algorithms
 
 
 
 
12
  ---
13
 
14
  # LeetCode Code-Gen Dataset — JavaScript
15
 
16
- Problem statement + examples + required algorithm/technique -> JavaScript solution.
17
- 631 rows. Sourced from doocs/leetcode.
18
 
19
- **Not execution-verified** no compiler/runtime harness exists yet for this language. Extracted directly from doocs/leetcode community solutions; treat correctness as likely, not guaranteed.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
  ## Fields
22
- - `slug`: LeetCode problem slug
23
- - `solution_id`: unique id, problem + approach index + language
24
- - `primary_algorithm`: normalized algorithm/technique label
25
- - `verified`: true/false for Python (execution-checked), null for other languages
26
- - `messages`: chat-format (system/user/assistant), ready for SFT
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  - text-generation
5
  language:
6
  - en
7
+ pretty_name: LeetCode Code-Gen (JavaScript)
8
+ size_categories:
9
+ - n<1K
10
  tags:
11
  - code
12
  - javascript
13
  - leetcode
14
  - algorithms
15
+ - code-generation
16
+ - competitive-programming
17
+ - instruction-tuning
18
+ - sft
19
  ---
20
 
21
  # LeetCode Code-Gen Dataset — JavaScript
22
 
23
+ 631 rows. Given a problem statement, its input/output examples, and a
24
+ required algorithm/technique, generate a correct JavaScript solution.
25
 
26
+ Part of a 4-language collection built from the same source: see the sibling
27
+ [Python](https://huggingface.co/datasets/AmareshHebbar/leetcode-codegen-python),
28
+ [Java](https://huggingface.co/datasets/AmareshHebbar/leetcode-codegen-java),
29
+ [C++](https://huggingface.co/datasets/AmareshHebbar/leetcode-codegen-cpp), and
30
+ [JavaScript](https://huggingface.co/datasets/AmareshHebbar/leetcode-codegen-javascript)
31
+ datasets.
32
+
33
+ ## Verification
34
+
35
+ **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 named solution approaches in [doocs/leetcode](https://github.com/doocs/leetcode), a well-maintained community solutions repo, so correctness is likely but not guaranteed. Treat this the way you'd treat any unverified scraped code dataset.
36
+
37
+ ## Source
38
+
39
+ Extracted from [doocs/leetcode](https://github.com/doocs/leetcode), which
40
+ documents multiple named solution approaches per problem (e.g. "Dynamic
41
+ Programming", "Two Pointers", "Divide and Conquer") -- this is what makes
42
+ per-row algorithm labeling possible, since the same problem can appear
43
+ multiple times with a different technique and different code each time.
44
 
45
  ## Fields
46
+
47
+ | field | description |
48
+ |---|---|
49
+ | `slug` | LeetCode problem slug |
50
+ | `solution_id` | unique id: problem + approach index + language |
51
+ | `primary_algorithm` | normalized algorithm/technique label |
52
+ | `verified` | `true`/`false` for Python (execution-checked), `null` for other languages |
53
+ | `messages` | chat-format (system/user/assistant), ready for SFT |
54
+
55
+ ## Example row
56
+
57
+ ```json
58
+ {
59
+ "slug": "house-robber",
60
+ "primary_algorithm": "Dynamic Programming",
61
+ "messages": [
62
+ {"role": "system", "content": "You are a competitive programming assistant..."},
63
+ {"role": "user", "content": "### Problem\n...\n### Algorithm\nDynamic Programming"},
64
+ {"role": "assistant", "content": "```javascript\n...\n```"}
65
+ ]
66
+ }
67
+ ```
68
+
69
+ ## Known gaps
70
+
71
+ - SQL/database problems excluded (wrong problem type for a code-execution harness)
72
+ - Design/class problems (LRU Cache, iterators) excluded -- they need a
73
+ sequence of method calls to test, not a single input -> output check
74
+ - Some `Brute Force` labels are a fallback where the source didn't name a
75
+ specific technique for that approach