Dataset Viewer
Auto-converted to Parquet Duplicate
conversations
listlengths
2
2
metadata
dict
id
stringlengths
36
36
[ { "from": "human", "value": "**Longest Substring Without Repeating Characters** (Medium)\n\nGiven a string `s`, find the length of the longest substring without repeating characters.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edg...
{ "category": "sliding_window", "difficulty": "medium", "language": "python", "title": "Longest Substring Without Repeating Characters" }
5263be6a-fb05-410b-b6f5-5d3388f75ea1
[ { "from": "human", "value": "**Binary Tree Level Order Traversal** (Medium)\n\nGiven the root of a binary tree, return the level order traversal of its nodes' values (i.e., from left to right, level by level).\n\nPlease provide a solution in python with a clear explanation of the approach, time/space comple...
{ "category": "trees", "difficulty": "medium", "language": "python", "title": "Binary Tree Level Order Traversal" }
a120d51d-e9b5-489a-843f-a4e364cfb58d
[ { "from": "human", "value": "**Longest Substring Without Repeating Characters** (Medium)\n\nGiven a string `s`, find the length of the longest substring without repeating characters.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edg...
{ "category": "sliding_window", "difficulty": "medium", "language": "python", "title": "Longest Substring Without Repeating Characters" }
da6c9768-3f7c-41ea-a13c-c5804b00f54c
[ { "from": "human", "value": "Design a URL shortening service like bit.ly. The system should support: creating short URLs from long URLs, redirecting short URLs to original URLs, and optionally tracking click analytics." }, { "from": "gpt", "value": "## System Design: URL Shortener\n\n### Require...
{ "category": "system_design", "difficulty": "hard", "language": "conceptual", "title": "Design a URL Shortener" }
0bb3ec20-8e0e-4eec-97c7-f1a15abb1cae
[ { "from": "human", "value": "**Longest Substring Without Repeating Characters** (Medium)\n\nGiven a string `s`, find the length of the longest substring without repeating characters.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edg...
{ "category": "sliding_window", "difficulty": "medium", "language": "python", "title": "Longest Substring Without Repeating Characters" }
3a57dea2-4b86-42b4-be01-a851d728991a
[ { "from": "human", "value": "**Longest Increasing Subsequence** (Hard)\n\nGiven an integer array `nums`, return the length of the longest strictly increasing subsequence.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edge cases." ...
{ "category": "dynamic_programming", "difficulty": "hard", "language": "python", "title": "Longest Increasing Subsequence" }
be4fa566-d3c7-4c22-b1a5-3be484728263
[ { "from": "human", "value": "**Longest Substring Without Repeating Characters** (Medium)\n\nGiven a string `s`, find the length of the longest substring without repeating characters.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edg...
{ "category": "sliding_window", "difficulty": "medium", "language": "python", "title": "Longest Substring Without Repeating Characters" }
53904de8-cdbd-447d-a2a5-0094b70ba2b4
[ { "from": "human", "value": "**Daily Temperatures** (Medium)\n\nGiven an array of integers `temperatures` representing daily temperatures, return an array `answer` such that `answer[i]` is the number of days you have to wait after the `i`-th day to get a warmer temperature. If there is no future day with a ...
{ "category": "stack_queue", "difficulty": "medium", "language": "python", "title": "Daily Temperatures" }
f3737247-b476-4664-abae-a400d35fa900
[ { "from": "human", "value": "**Course Schedule II (Topological Sort)** (Hard)\n\nThere are `numCourses` courses labeled from 0 to numCourses-1. Given `prerequisites[i] = [a, b]` meaning you must take course b before course a, return the ordering of courses you should take to finish all courses. If impossibl...
{ "category": "graphs", "difficulty": "hard", "language": "python", "title": "Course Schedule II (Topological Sort)" }
a8d6d478-2d8a-4f4d-a9d7-9d347ad2c45e
[ { "from": "human", "value": "**Search in Rotated Sorted Array** (Medium)\n\nAn integer array `nums` is sorted in ascending order and then rotated at some pivot. Given the array after rotation and an integer `target`, return the index of `target` if it is in `nums`, or -1 if it is not.\n\nPlease provide a so...
{ "category": "binary_search", "difficulty": "medium", "language": "python", "title": "Search in Rotated Sorted Array" }
47fadbf9-e40a-44d8-aeb4-f63a962b0d86
[ { "from": "human", "value": "**Longest Increasing Subsequence** (Hard)\n\nGiven an integer array `nums`, return the length of the longest strictly increasing subsequence.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edge cases." ...
{ "category": "dynamic_programming", "difficulty": "hard", "language": "python", "title": "Longest Increasing Subsequence" }
71f366b5-cea5-4b89-8db2-87351689f2d9
[ { "from": "human", "value": "**Coin Change** (Medium)\n\nYou are given an integer array `coins` representing coins of different denominations and an integer `amount` representing a total amount of money. Return the fewest number of coins needed to make up that amount. If that amount of money cannot be made ...
{ "category": "dynamic_programming", "difficulty": "medium", "language": "python", "title": "Coin Change" }
bbfc65e9-e4a3-4932-93bc-ff3a9d206be1
[ { "from": "human", "value": "Design a URL shortening service like bit.ly. The system should support: creating short URLs from long URLs, redirecting short URLs to original URLs, and optionally tracking click analytics." }, { "from": "gpt", "value": "## System Design: URL Shortener\n\n### Require...
{ "category": "system_design", "difficulty": "hard", "language": "conceptual", "title": "Design a URL Shortener" }
97179f2b-d64e-4e6a-9e71-196d6f8159e3
[ { "from": "human", "value": "**Daily Temperatures** (Medium)\n\nGiven an array of integers `temperatures` representing daily temperatures, return an array `answer` such that `answer[i]` is the number of days you have to wait after the `i`-th day to get a warmer temperature. If there is no future day with a ...
{ "category": "stack_queue", "difficulty": "medium", "language": "python", "title": "Daily Temperatures" }
d5fe6e25-1bf1-46cf-9b32-cba1dedddae0
[ { "from": "human", "value": "**Daily Temperatures** (Medium)\n\nGiven an array of integers `temperatures` representing daily temperatures, return an array `answer` such that `answer[i]` is the number of days you have to wait after the `i`-th day to get a warmer temperature. If there is no future day with a ...
{ "category": "stack_queue", "difficulty": "medium", "language": "python", "title": "Daily Temperatures" }
8959c491-5b2b-42d1-88c0-b36d1312732c
[ { "from": "human", "value": "How would you answer: 'Tell me about a significant technical mistake you made and what you learned from it.'" }, { "from": "gpt", "value": "**Strong Answer:**\n\n**The Mistake:**\nTwo years ago, I was deploying a database schema migration on a production PostgreSQL t...
{ "category": "behavioral", "difficulty": "medium", "language": "behavioral", "title": "Describe a Time You Made a Mistake" }
89fb1393-9565-443c-9311-79324319c253
[ { "from": "human", "value": "**Group Anagrams** (Medium)\n\nGiven an array of strings `strs`, group the anagrams together. You can return the answer in any order.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edge cases." }, { ...
{ "category": "arrays_hashing", "difficulty": "medium", "language": "python", "title": "Group Anagrams" }
73884bf4-384c-4e9a-bfe7-2548a28bce84
[ { "from": "human", "value": "**Edit Distance (Levenshtein Distance)** (Hard)\n\nGiven two strings `word1` and `word2`, return the minimum number of operations required to convert `word1` to `word2`. Operations allowed: insert a character, delete a character, replace a character.\n\nPlease provide a solution...
{ "category": "dynamic_programming", "difficulty": "hard", "language": "python", "title": "Edit Distance (Levenshtein Distance)" }
e84ddd1d-2876-4968-97f7-7697eb711578
[ { "from": "human", "value": "**Longest Substring Without Repeating Characters** (Medium)\n\nGiven a string `s`, find the length of the longest substring without repeating characters.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edg...
{ "category": "sliding_window", "difficulty": "medium", "language": "python", "title": "Longest Substring Without Repeating Characters" }
c5a7d63e-ddcc-444d-9765-0a9655dbc893
[ { "from": "human", "value": "**Two Sum** (Easy)\n\nGiven an array of integers `nums` and an integer `target`, return the indices of the two numbers that add up to `target`. You may assume that each input would have exactly one solution, and you may not use the same element twice.\n\nPlease provide a solutio...
{ "category": "arrays_hashing", "difficulty": "easy", "language": "python", "title": "Two Sum" }
ec35f068-0232-4214-b59f-392e316bc782
[ { "from": "human", "value": "How would you answer: 'Tell me about a significant technical mistake you made and what you learned from it.'" }, { "from": "gpt", "value": "**Strong Answer:**\n\n**The Mistake:**\nTwo years ago, I was deploying a database schema migration on a production PostgreSQL t...
{ "category": "behavioral", "difficulty": "medium", "language": "behavioral", "title": "Describe a Time You Made a Mistake" }
bdc5ead6-288b-4ba5-9c80-6e9f19d964a0
[ { "from": "human", "value": "**Binary Tree Level Order Traversal** (Medium)\n\nGiven the root of a binary tree, return the level order traversal of its nodes' values (i.e., from left to right, level by level).\n\nPlease provide a solution in python with a clear explanation of the approach, time/space comple...
{ "category": "trees", "difficulty": "medium", "language": "python", "title": "Binary Tree Level Order Traversal" }
ace38620-9b86-42ab-9f03-8bed76d2d837
[ { "from": "human", "value": "**Longest Substring Without Repeating Characters** (Medium)\n\nGiven a string `s`, find the length of the longest substring without repeating characters.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edg...
{ "category": "sliding_window", "difficulty": "medium", "language": "python", "title": "Longest Substring Without Repeating Characters" }
49ee33f5-38f6-4071-a3c6-aa66f0d7e060
[ { "from": "human", "value": "**Group Anagrams** (Medium)\n\nGiven an array of strings `strs`, group the anagrams together. You can return the answer in any order.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edge cases." }, { ...
{ "category": "arrays_hashing", "difficulty": "medium", "language": "python", "title": "Group Anagrams" }
94f28af7-3697-41d4-b4c9-14694f5d176b
[ { "from": "human", "value": "Design a scalable notification system that supports push notifications, email, and SMS. The system should handle millions of users and support different notification types with user preferences." }, { "from": "gpt", "value": "## System Design: Notification System\n\n...
{ "category": "system_design", "difficulty": "hard", "language": "conceptual", "title": "Design a Notification System" }
f46dba2d-e73d-475b-acae-55178dcf84c9
[ { "from": "human", "value": "**Daily Temperatures** (Medium)\n\nGiven an array of integers `temperatures` representing daily temperatures, return an array `answer` such that `answer[i]` is the number of days you have to wait after the `i`-th day to get a warmer temperature. If there is no future day with a ...
{ "category": "stack_queue", "difficulty": "medium", "language": "python", "title": "Daily Temperatures" }
e1937d4b-26bd-4f1a-bb7b-46030e3c7487
[ { "from": "human", "value": "How would you answer the behavioral interview question: 'Tell me about a time you disagreed with your manager or a technical decision, and how you handled it.'" }, { "from": "gpt", "value": "**Strong Answer (STAR Format):**\n\n**Situation:**\nAt my previous role, our...
{ "category": "behavioral", "difficulty": "medium", "language": "behavioral", "title": "Tell Me About a Time You Disagreed With Your Manager" }
40ab5383-e150-4f26-97fd-23cd2479a4bc
[ { "from": "human", "value": "**Subsets** (Medium)\n\nGiven an integer array `nums` of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order.\n\nPlease provide a solution in python with a clear explanation of the ap...
{ "category": "backtracking", "difficulty": "medium", "language": "python", "title": "Subsets" }
3aafd763-849d-449a-a5a0-47db0cdcaac2
[ { "from": "human", "value": "**Edit Distance (Levenshtein Distance)** (Hard)\n\nGiven two strings `word1` and `word2`, return the minimum number of operations required to convert `word1` to `word2`. Operations allowed: insert a character, delete a character, replace a character.\n\nPlease provide a solution...
{ "category": "dynamic_programming", "difficulty": "hard", "language": "python", "title": "Edit Distance (Levenshtein Distance)" }
857ddc91-6194-4d45-9935-3334ba3f7527
[ { "from": "human", "value": "**Search in Rotated Sorted Array** (Medium)\n\nAn integer array `nums` is sorted in ascending order and then rotated at some pivot. Given the array after rotation and an integer `target`, return the index of `target` if it is in `nums`, or -1 if it is not.\n\nPlease provide a so...
{ "category": "binary_search", "difficulty": "medium", "language": "python", "title": "Search in Rotated Sorted Array" }
db1a1826-a758-4908-91ed-a59345b94a85
[ { "from": "human", "value": "Design a scalable notification system that supports push notifications, email, and SMS. The system should handle millions of users and support different notification types with user preferences." }, { "from": "gpt", "value": "## System Design: Notification System\n\n...
{ "category": "system_design", "difficulty": "hard", "language": "conceptual", "title": "Design a Notification System" }
f58afb0b-6d7c-4709-8b34-9e315e04216a
[ { "from": "human", "value": "**Two Sum** (Easy)\n\nGiven an array of integers `nums` and an integer `target`, return the indices of the two numbers that add up to `target`. You may assume that each input would have exactly one solution, and you may not use the same element twice.\n\nPlease provide a solutio...
{ "category": "arrays_hashing", "difficulty": "easy", "language": "python", "title": "Two Sum" }
75c8784b-f706-41d6-a36f-d91544878ddf
[ { "from": "human", "value": "**Coin Change** (Medium)\n\nYou are given an integer array `coins` representing coins of different denominations and an integer `amount` representing a total amount of money. Return the fewest number of coins needed to make up that amount. If that amount of money cannot be made ...
{ "category": "dynamic_programming", "difficulty": "medium", "language": "python", "title": "Coin Change" }
3be1efab-55a2-4d81-8f65-27301cdcbbfb
[ { "from": "human", "value": "How would you answer: 'Tell me about a significant technical mistake you made and what you learned from it.'" }, { "from": "gpt", "value": "**Strong Answer:**\n\n**The Mistake:**\nTwo years ago, I was deploying a database schema migration on a production PostgreSQL t...
{ "category": "behavioral", "difficulty": "medium", "language": "behavioral", "title": "Describe a Time You Made a Mistake" }
dbf3ecba-672f-47ea-9533-dc968af972ec
[ { "from": "human", "value": "**Edit Distance (Levenshtein Distance)** (Hard)\n\nGiven two strings `word1` and `word2`, return the minimum number of operations required to convert `word1` to `word2`. Operations allowed: insert a character, delete a character, replace a character.\n\nPlease provide a solution...
{ "category": "dynamic_programming", "difficulty": "hard", "language": "python", "title": "Edit Distance (Levenshtein Distance)" }
9be57c3b-c412-473d-9b82-cc5a15388e06
[ { "from": "human", "value": "**Number of Islands** (Medium)\n\nGiven an `m x n` 2D binary grid where '1' represents land and '0' represents water, return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically.\n\nPlease provide a solutio...
{ "category": "graphs", "difficulty": "medium", "language": "python", "title": "Number of Islands" }
7a28ec77-2945-4187-bb62-1ef20abd74e8
[ { "from": "human", "value": "**Reverse a Linked List** (Easy)\n\nGiven the head of a singly linked list, reverse the list and return the reversed list's head. Solve it both iteratively and recursively.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, an...
{ "category": "linked_list", "difficulty": "easy", "language": "python", "title": "Reverse a Linked List" }
3ee7a58d-a9fd-4a78-976a-26f0f3f76858
[ { "from": "human", "value": "How would you answer: 'Tell me about a significant technical mistake you made and what you learned from it.'" }, { "from": "gpt", "value": "**Strong Answer:**\n\n**The Mistake:**\nTwo years ago, I was deploying a database schema migration on a production PostgreSQL t...
{ "category": "behavioral", "difficulty": "medium", "language": "behavioral", "title": "Describe a Time You Made a Mistake" }
0a17331b-def7-4996-bfdb-c3251a8784da
[ { "from": "human", "value": "**Daily Temperatures** (Medium)\n\nGiven an array of integers `temperatures` representing daily temperatures, return an array `answer` such that `answer[i]` is the number of days you have to wait after the `i`-th day to get a warmer temperature. If there is no future day with a ...
{ "category": "stack_queue", "difficulty": "medium", "language": "python", "title": "Daily Temperatures" }
a60d172c-f211-4cd2-9e77-23e9fb3f1390
[ { "from": "human", "value": "**Longest Substring Without Repeating Characters** (Medium)\n\nGiven a string `s`, find the length of the longest substring without repeating characters.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edg...
{ "category": "sliding_window", "difficulty": "medium", "language": "python", "title": "Longest Substring Without Repeating Characters" }
07c12dd2-f964-488f-99aa-4a989336a98b
[ { "from": "human", "value": "**Binary Tree Level Order Traversal** (Medium)\n\nGiven the root of a binary tree, return the level order traversal of its nodes' values (i.e., from left to right, level by level).\n\nPlease provide a solution in python with a clear explanation of the approach, time/space comple...
{ "category": "trees", "difficulty": "medium", "language": "python", "title": "Binary Tree Level Order Traversal" }
9a68aa99-a6a5-4a6a-92e7-7b60c2a719bb
[ { "from": "human", "value": "**Longest Increasing Subsequence** (Hard)\n\nGiven an integer array `nums`, return the length of the longest strictly increasing subsequence.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edge cases." ...
{ "category": "dynamic_programming", "difficulty": "hard", "language": "python", "title": "Longest Increasing Subsequence" }
1eb8313b-1e96-43e6-b1c1-275b6eed0ef8
[ { "from": "human", "value": "**Reverse a Linked List** (Easy)\n\nGiven the head of a singly linked list, reverse the list and return the reversed list's head. Solve it both iteratively and recursively.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, an...
{ "category": "linked_list", "difficulty": "easy", "language": "python", "title": "Reverse a Linked List" }
f688a031-bd90-459a-abd4-4a92bbfc8825
[ { "from": "human", "value": "**Course Schedule II (Topological Sort)** (Hard)\n\nThere are `numCourses` courses labeled from 0 to numCourses-1. Given `prerequisites[i] = [a, b]` meaning you must take course b before course a, return the ordering of courses you should take to finish all courses. If impossibl...
{ "category": "graphs", "difficulty": "hard", "language": "python", "title": "Course Schedule II (Topological Sort)" }
68d9e728-5833-402b-931c-2b444a28cca7
[ { "from": "human", "value": "How would you answer: 'Tell me about a significant technical mistake you made and what you learned from it.'" }, { "from": "gpt", "value": "**Strong Answer:**\n\n**The Mistake:**\nTwo years ago, I was deploying a database schema migration on a production PostgreSQL t...
{ "category": "behavioral", "difficulty": "medium", "language": "behavioral", "title": "Describe a Time You Made a Mistake" }
5c00074f-94fa-4d29-b6be-87615242daf9
[ { "from": "human", "value": "**Top K Frequent Elements** (Medium)\n\nGiven an integer array `nums` and an integer `k`, return the `k` most frequent elements. You may return the answer in any order.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and an...
{ "category": "heap_priority_queue", "difficulty": "medium", "language": "python", "title": "Top K Frequent Elements" }
6fd4e5af-b828-450f-843d-d713abda9665
[ { "from": "human", "value": "Design a URL shortening service like bit.ly. The system should support: creating short URLs from long URLs, redirecting short URLs to original URLs, and optionally tracking click analytics." }, { "from": "gpt", "value": "## System Design: URL Shortener\n\n### Require...
{ "category": "system_design", "difficulty": "hard", "language": "conceptual", "title": "Design a URL Shortener" }
760f6703-a5b1-444b-8e7a-53a72ebc7d87
[ { "from": "human", "value": "**Edit Distance (Levenshtein Distance)** (Hard)\n\nGiven two strings `word1` and `word2`, return the minimum number of operations required to convert `word1` to `word2`. Operations allowed: insert a character, delete a character, replace a character.\n\nPlease provide a solution...
{ "category": "dynamic_programming", "difficulty": "hard", "language": "python", "title": "Edit Distance (Levenshtein Distance)" }
11ae07cd-ae61-4386-a4b6-a2bee407cf1f
[ { "from": "human", "value": "Design a rate limiter that can be used as middleware for a web API. Support multiple rate limiting strategies and work across distributed servers." }, { "from": "gpt", "value": "## System Design: Distributed Rate Limiter\n\n### Requirements\n- Limit requests per user...
{ "category": "system_design", "difficulty": "hard", "language": "conceptual", "title": "Design a Rate Limiter" }
adfcab72-0dc8-44e2-a8fa-90862ca13414
[ { "from": "human", "value": "**Daily Temperatures** (Medium)\n\nGiven an array of integers `temperatures` representing daily temperatures, return an array `answer` such that `answer[i]` is the number of days you have to wait after the `i`-th day to get a warmer temperature. If there is no future day with a ...
{ "category": "stack_queue", "difficulty": "medium", "language": "python", "title": "Daily Temperatures" }
18bdb990-ffd0-4d8f-8b16-f285f4e5fba8
[ { "from": "human", "value": "**Number of Islands** (Medium)\n\nGiven an `m x n` 2D binary grid where '1' represents land and '0' represents water, return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically.\n\nPlease provide a solutio...
{ "category": "graphs", "difficulty": "medium", "language": "python", "title": "Number of Islands" }
5aa911a3-d475-4ef3-95ce-d16b0f46dc88
[ { "from": "human", "value": "**Subsets** (Medium)\n\nGiven an integer array `nums` of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order.\n\nPlease provide a solution in python with a clear explanation of the ap...
{ "category": "backtracking", "difficulty": "medium", "language": "python", "title": "Subsets" }
f3e8da6c-16e6-41ea-8e91-27022ec6b48b
[ { "from": "human", "value": "**Binary Tree Level Order Traversal** (Medium)\n\nGiven the root of a binary tree, return the level order traversal of its nodes' values (i.e., from left to right, level by level).\n\nPlease provide a solution in python with a clear explanation of the approach, time/space comple...
{ "category": "trees", "difficulty": "medium", "language": "python", "title": "Binary Tree Level Order Traversal" }
23c4a07a-eb0c-40c0-a5b7-7f252365054c
[ { "from": "human", "value": "**Reverse a Linked List** (Easy)\n\nGiven the head of a singly linked list, reverse the list and return the reversed list's head. Solve it both iteratively and recursively.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, an...
{ "category": "linked_list", "difficulty": "easy", "language": "python", "title": "Reverse a Linked List" }
7fb82724-04e1-4f00-9c06-ce93879091c9
[ { "from": "human", "value": "**Edit Distance (Levenshtein Distance)** (Hard)\n\nGiven two strings `word1` and `word2`, return the minimum number of operations required to convert `word1` to `word2`. Operations allowed: insert a character, delete a character, replace a character.\n\nPlease provide a solution...
{ "category": "dynamic_programming", "difficulty": "hard", "language": "python", "title": "Edit Distance (Levenshtein Distance)" }
2508fa50-2900-4eb2-8a01-88cc02055b8a
[ { "from": "human", "value": "Design a URL shortening service like bit.ly. The system should support: creating short URLs from long URLs, redirecting short URLs to original URLs, and optionally tracking click analytics." }, { "from": "gpt", "value": "## System Design: URL Shortener\n\n### Require...
{ "category": "system_design", "difficulty": "hard", "language": "conceptual", "title": "Design a URL Shortener" }
404f09ab-5ac1-4a14-9fd2-58d40db52cd5
[ { "from": "human", "value": "**Binary Tree Level Order Traversal** (Medium)\n\nGiven the root of a binary tree, return the level order traversal of its nodes' values (i.e., from left to right, level by level).\n\nPlease provide a solution in python with a clear explanation of the approach, time/space comple...
{ "category": "trees", "difficulty": "medium", "language": "python", "title": "Binary Tree Level Order Traversal" }
4bf3eb0f-5e55-4036-97e1-dcccf54d2692
[ { "from": "human", "value": "**Edit Distance (Levenshtein Distance)** (Hard)\n\nGiven two strings `word1` and `word2`, return the minimum number of operations required to convert `word1` to `word2`. Operations allowed: insert a character, delete a character, replace a character.\n\nPlease provide a solution...
{ "category": "dynamic_programming", "difficulty": "hard", "language": "python", "title": "Edit Distance (Levenshtein Distance)" }
9e12f2c1-22d8-4a87-bee6-970931ca7f79
[ { "from": "human", "value": "**Binary Tree Level Order Traversal** (Medium)\n\nGiven the root of a binary tree, return the level order traversal of its nodes' values (i.e., from left to right, level by level).\n\nPlease provide a solution in python with a clear explanation of the approach, time/space comple...
{ "category": "trees", "difficulty": "medium", "language": "python", "title": "Binary Tree Level Order Traversal" }
9be6e615-ddff-4039-b2c0-7f2b8f6247d5
[ { "from": "human", "value": "**Top K Frequent Elements** (Medium)\n\nGiven an integer array `nums` and an integer `k`, return the `k` most frequent elements. You may return the answer in any order.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and an...
{ "category": "heap_priority_queue", "difficulty": "medium", "language": "python", "title": "Top K Frequent Elements" }
b99d4715-20f8-46e1-b64d-d76f7ce68d5a
[ { "from": "human", "value": "How would you answer the behavioral interview question: 'Tell me about a time you disagreed with your manager or a technical decision, and how you handled it.'" }, { "from": "gpt", "value": "**Strong Answer (STAR Format):**\n\n**Situation:**\nAt my previous role, our...
{ "category": "behavioral", "difficulty": "medium", "language": "behavioral", "title": "Tell Me About a Time You Disagreed With Your Manager" }
420c504c-6521-43e1-a9a2-e47c50ab8303
[ { "from": "human", "value": "**Reverse a Linked List** (Easy)\n\nGiven the head of a singly linked list, reverse the list and return the reversed list's head. Solve it both iteratively and recursively.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, an...
{ "category": "linked_list", "difficulty": "easy", "language": "python", "title": "Reverse a Linked List" }
1a366b7c-290c-4518-972f-b05d2a37f781
[ { "from": "human", "value": "**Edit Distance (Levenshtein Distance)** (Hard)\n\nGiven two strings `word1` and `word2`, return the minimum number of operations required to convert `word1` to `word2`. Operations allowed: insert a character, delete a character, replace a character.\n\nPlease provide a solution...
{ "category": "dynamic_programming", "difficulty": "hard", "language": "python", "title": "Edit Distance (Levenshtein Distance)" }
30ee6b17-07ec-4e5e-8515-4830d3cb2640
End of preview. Expand in Data Studio

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

{
  "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

Downloads last month
24