Add dataset card
Browse files
README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
size_categories:
|
| 6 |
+
- 100K<n<1M
|
| 7 |
+
task_categories:
|
| 8 |
+
- text-generation
|
| 9 |
+
pretty_name: Coding Interview SFT (100K)
|
| 10 |
+
tags:
|
| 11 |
+
- coding-interview
|
| 12 |
+
- algorithms
|
| 13 |
+
- data-structures
|
| 14 |
+
- system-design
|
| 15 |
+
- leetcode
|
| 16 |
+
- python
|
| 17 |
+
- software-engineering
|
| 18 |
+
- education
|
| 19 |
+
- technical-interview
|
| 20 |
+
- sft
|
| 21 |
+
- supervised-fine-tuning
|
| 22 |
+
- synthetic
|
| 23 |
+
configs:
|
| 24 |
+
- config_name: default
|
| 25 |
+
data_files:
|
| 26 |
+
- split: train
|
| 27 |
+
path: coding-interview-sft-100k.jsonl
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
# Coding Interview SFT (100K)
|
| 31 |
+
|
| 32 |
+
100,000 ShareGPT conversations demonstrating expert-level coding interview preparation across algorithms, data structures, system design, and behavioral questions. Each example provides a complete solution with detailed explanation of the approach, step-by-step reasoning, time/space complexity analysis, and edge case handling.
|
| 33 |
+
|
| 34 |
+
## Motivation
|
| 35 |
+
|
| 36 |
+
Coding interview preparation is one of the highest-demand AI assistant use cases. Models commonly fail by:
|
| 37 |
+
|
| 38 |
+
- **Giving the solution without explaining the intuition**: The reader gets code but doesn't understand why this approach works
|
| 39 |
+
- **Skipping the "why not brute force"**: Not explaining why an O(n²) approach is insufficient and what insight enables the O(n log n) solution
|
| 40 |
+
- **Missing edge cases**: Solutions that fail on empty input, single elements, or duplicate values
|
| 41 |
+
- **Wrong complexity analysis**: Claiming O(n) for an O(n log k) algorithm, or missing the space complexity
|
| 42 |
+
- **No pattern recognition**: Not connecting the problem to the underlying pattern (sliding window, monotonic stack, two pointers, etc.)
|
| 43 |
+
- **Inadequate behavioral question answers**: Vague stories without STAR structure or concrete outcomes
|
| 44 |
+
|
| 45 |
+
This dataset trains models to teach coding interviews at the level of an experienced mentor — not just providing correct answers, but building the candidate's understanding of *why* the solution works.
|
| 46 |
+
|
| 47 |
+
## Dataset Description
|
| 48 |
+
|
| 49 |
+
**100,000 conversations** across 7 problem categories and 3 difficulty levels:
|
| 50 |
+
|
| 51 |
+
### Problem Categories
|
| 52 |
+
|
| 53 |
+
| Category | Examples |
|
| 54 |
+
|---|---|
|
| 55 |
+
| `arrays_hashing` | Two Sum, Group Anagrams, Top K Frequent |
|
| 56 |
+
| `two_pointers` | Container With Most Water, 3Sum, Trapping Rain Water |
|
| 57 |
+
| `sliding_window` | Longest Substring Without Repeating Characters, Minimum Window Substring |
|
| 58 |
+
| `binary_search` | Search in Rotated Sorted Array, Koko Eating Bananas |
|
| 59 |
+
| `dynamic_programming` | Coin Change, LIS, Edit Distance, Knapsack |
|
| 60 |
+
| `trees` | Level Order Traversal, Diameter, Lowest Common Ancestor |
|
| 61 |
+
| `graphs` | Number of Islands, Course Schedule, Dijkstra's |
|
| 62 |
+
| `heap_priority_queue` | Top K Frequent, Merge K Sorted Lists, Task Scheduler |
|
| 63 |
+
| `stack_queue` | Daily Temperatures, Valid Parentheses, Monotonic Stack |
|
| 64 |
+
| `linked_list` | Reverse Linked List, Merge Sorted Lists, Detect Cycle |
|
| 65 |
+
| `backtracking` | Subsets, Permutations, Combination Sum |
|
| 66 |
+
| `system_design` | URL Shortener, Rate Limiter, Notification System |
|
| 67 |
+
| `behavioral` | Disagreement with manager, Significant mistakes, Leadership |
|
| 68 |
+
|
| 69 |
+
### Difficulty Distribution
|
| 70 |
+
- `easy`: ~25% — foundational problems with clear patterns
|
| 71 |
+
- `medium`: ~60% — the core of FAANG interviews
|
| 72 |
+
- `hard`: ~15% — advanced algorithms and system design
|
| 73 |
+
|
| 74 |
+
## Format
|
| 75 |
+
|
| 76 |
+
```json
|
| 77 |
+
{
|
| 78 |
+
"conversations": [
|
| 79 |
+
{
|
| 80 |
+
"from": "human",
|
| 81 |
+
"value": "**Two Sum** (Easy)\n\nGiven an array of integers `nums` and an integer `target`...\n\nPlease provide a solution in python with a clear explanation..."
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"from": "gpt",
|
| 85 |
+
"value": "```python\ndef twoSum(nums, target):\n seen = {}\n for i, num in enumerate(nums):\n ...\n```\n\n**Approach: Hash Map (One Pass)**\n\nThe brute-force approach checks every pair in O(n²)..."
|
| 86 |
+
}
|
| 87 |
+
],
|
| 88 |
+
"metadata": {
|
| 89 |
+
"category": "arrays_hashing",
|
| 90 |
+
"difficulty": "easy",
|
| 91 |
+
"language": "python",
|
| 92 |
+
"title": "Two Sum"
|
| 93 |
+
},
|
| 94 |
+
"id": "abc123"
|
| 95 |
+
}
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
## Key Properties of Responses
|
| 99 |
+
|
| 100 |
+
**1. Pattern identification before code**: Every algorithmic response names the underlying pattern (sliding window, monotonic stack, BFS, etc.) and explains *why* this pattern applies to this problem.
|
| 101 |
+
|
| 102 |
+
**2. Brute force → optimization path**: Responses acknowledge the naive approach and explain the insight that enables a better solution — building the candidate's problem-solving intuition.
|
| 103 |
+
|
| 104 |
+
**3. Step-by-step trace**: Complex algorithms include a worked example tracing through the algorithm on a concrete input.
|
| 105 |
+
|
| 106 |
+
**4. Edge cases explicitly addressed**: Empty input, single elements, all-same elements, overflow conditions — named and handled.
|
| 107 |
+
|
| 108 |
+
**5. Complexity analysis with justification**: Not just "O(n)" but *why* — which operation is O(n) and how the algorithm avoids doing it more than necessary.
|
| 109 |
+
|
| 110 |
+
**6. Multiple approaches where relevant**: Many problems include both the clean main solution and a notable alternative (recursive vs. iterative, sorting vs. hash map, DP vs. greedy).
|
| 111 |
+
|
| 112 |
+
**7. System design depth**: System design problems include API design, data modeling, architecture diagrams, scaling decisions, and specific trade-off analysis — not just high-level overviews.
|
| 113 |
+
|
| 114 |
+
**8. Behavioral STAR format**: Behavioral questions include a model answer with Situation/Task/Action/Result structure, common mistakes to avoid, and follow-up questions to prepare for.
|
| 115 |
+
|
| 116 |
+
## Use Cases
|
| 117 |
+
|
| 118 |
+
- SFT fine-tuning for AI coding interview prep tools (AlgoExpert, LeetCode AI, Pramp)
|
| 119 |
+
- Training AI tutors for software engineering education
|
| 120 |
+
- Building AI interview coaches for bootcamps and universities
|
| 121 |
+
- Improving model performance on algorithmic reasoning benchmarks
|
| 122 |
+
- Training models for technical mentorship platforms
|
| 123 |
+
- Fine-tuning models for developer education and upskilling applications
|
| 124 |
+
|
| 125 |
+
## License
|
| 126 |
+
|
| 127 |
+
Apache 2.0
|