| --- |
| language: |
| - en |
| license: apache-2.0 |
| size_categories: |
| - 100K<n<1M |
| task_categories: |
| - text-generation |
| pretty_name: Coding Interview SFT (100K) |
| tags: |
| - coding-interview |
| - algorithms |
| - data-structures |
| - system-design |
| - leetcode |
| - python |
| - software-engineering |
| - education |
| - technical-interview |
| - sft |
| - supervised-fine-tuning |
| - synthetic |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: coding-interview-sft-100k.jsonl |
| --- |
| |
| # Coding Interview SFT (100K) |
|
|
| 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. |
|
|
| ## Motivation |
|
|
| Coding interview preparation is one of the highest-demand AI assistant use cases. Models commonly fail by: |
|
|
| - **Giving the solution without explaining the intuition**: The reader gets code but doesn't understand why this approach works |
| - **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 |
| - **Missing edge cases**: Solutions that fail on empty input, single elements, or duplicate values |
| - **Wrong complexity analysis**: Claiming O(n) for an O(n log k) algorithm, or missing the space complexity |
| - **No pattern recognition**: Not connecting the problem to the underlying pattern (sliding window, monotonic stack, two pointers, etc.) |
| - **Inadequate behavioral question answers**: Vague stories without STAR structure or concrete outcomes |
|
|
| 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. |
|
|
| ## Dataset Description |
|
|
| **100,000 conversations** across 7 problem categories and 3 difficulty levels: |
|
|
| ### Problem Categories |
|
|
| | Category | Examples | |
| |---|---| |
| | `arrays_hashing` | Two Sum, Group Anagrams, Top K Frequent | |
| | `two_pointers` | Container With Most Water, 3Sum, Trapping Rain Water | |
| | `sliding_window` | Longest Substring Without Repeating Characters, Minimum Window Substring | |
| | `binary_search` | Search in Rotated Sorted Array, Koko Eating Bananas | |
| | `dynamic_programming` | Coin Change, LIS, Edit Distance, Knapsack | |
| | `trees` | Level Order Traversal, Diameter, Lowest Common Ancestor | |
| | `graphs` | Number of Islands, Course Schedule, Dijkstra's | |
| | `heap_priority_queue` | Top K Frequent, Merge K Sorted Lists, Task Scheduler | |
| | `stack_queue` | Daily Temperatures, Valid Parentheses, Monotonic Stack | |
| | `linked_list` | Reverse Linked List, Merge Sorted Lists, Detect Cycle | |
| | `backtracking` | Subsets, Permutations, Combination Sum | |
| | `system_design` | URL Shortener, Rate Limiter, Notification System | |
| | `behavioral` | Disagreement with manager, Significant mistakes, Leadership | |
|
|
| ### Difficulty Distribution |
| - `easy`: ~25% — foundational problems with clear patterns |
| - `medium`: ~60% — the core of FAANG interviews |
| - `hard`: ~15% — advanced algorithms and system design |
|
|
| ## Format |
|
|
| ```json |
| { |
| "conversations": [ |
| { |
| "from": "human", |
| "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..." |
| }, |
| { |
| "from": "gpt", |
| "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²)..." |
| } |
| ], |
| "metadata": { |
| "category": "arrays_hashing", |
| "difficulty": "easy", |
| "language": "python", |
| "title": "Two Sum" |
| }, |
| "id": "abc123" |
| } |
| ``` |
|
|
| ## Key Properties of Responses |
|
|
| **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. |
|
|
| **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. |
|
|
| **3. Step-by-step trace**: Complex algorithms include a worked example tracing through the algorithm on a concrete input. |
|
|
| **4. Edge cases explicitly addressed**: Empty input, single elements, all-same elements, overflow conditions — named and handled. |
|
|
| **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. |
|
|
| **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). |
|
|
| **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. |
|
|
| **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. |
|
|
| ## Use Cases |
|
|
| - SFT fine-tuning for AI coding interview prep tools (AlgoExpert, LeetCode AI, Pramp) |
| - Training AI tutors for software engineering education |
| - Building AI interview coaches for bootcamps and universities |
| - Improving model performance on algorithmic reasoning benchmarks |
| - Training models for technical mentorship platforms |
| - Fine-tuning models for developer education and upskilling applications |
|
|
| ## License |
|
|
| Apache 2.0 |
|
|