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 |
[
{
"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"
} | 2d7aef1e-9586-4781-acec-d097990a57d1 |
[
{
"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"
} | 9ad7142b-34e8-4b9b-8176-007c347ab373 |
[
{
"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)"
} | fc3edfa5-f38e-44e7-a4d8-d5c505929684 |
[
{
"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)"
} | e31eaded-1381-44ad-bcbf-9cf2d73a529b |
[
{
"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)"
} | 26d2b955-0f5c-4e0c-9c77-d80c30577fb1 |
[
{
"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"
} | 99f2759f-1a06-4ea8-8be4-6050f1e02616 |
[
{
"from": "human",
"value": "**Container With Most Water** (Medium)\n\nGiven an integer array `height` of length n, where each element represents the height of a vertical line at position i. Find two lines that together with the x-axis form a container that holds the most water. Return the maximum amount of... | {
"category": "two_pointers",
"difficulty": "medium",
"language": "python",
"title": "Container With Most Water"
} | 1b2fcfb6-481f-49aa-b549-7781b74fb14e |
[
{
"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"
} | 61a5fcb5-1b0c-4004-9240-dda0a4b8fa06 |
[
{
"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"
} | 16baa198-38de-4166-a82c-ca9b32d948e4 |
[
{
"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"
} | dd4d51f1-f854-41da-9845-ebaebd420998 |
[
{
"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"
} | f5214d68-2dc8-4084-91ba-edf6d60f4516 |
[
{
"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"
} | cc31601c-eb62-466a-ba74-043ceec444ad |
[
{
"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"
} | cfbac6db-f40d-424a-b0b0-87e91bcda304 |
[
{
"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"
} | 9196d780-eb88-4064-bae9-90d73e6f6c34 |
[
{
"from": "human",
"value": "**Container With Most Water** (Medium)\n\nGiven an integer array `height` of length n, where each element represents the height of a vertical line at position i. Find two lines that together with the x-axis form a container that holds the most water. Return the maximum amount of... | {
"category": "two_pointers",
"difficulty": "medium",
"language": "python",
"title": "Container With Most Water"
} | f3cdf18b-d9d4-4e87-ba2c-5e7f9d9ef032 |
[
{
"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"
} | 59f4b091-caa3-4bcd-a83e-51fabc2a96a9 |
[
{
"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)"
} | ed87969a-18ad-4e89-b13b-51738456bf94 |
[
{
"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"
} | 6f317265-5e4b-4689-9a17-26b3cfccbec3 |
[
{
"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"
} | 68f43ce8-b28e-48af-a5dd-9753196e805d |
[
{
"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"
} | 9140158b-49a6-43b8-a8a2-ea0f1f0220f0 |
[
{
"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"
} | f6cfc561-d608-49e3-bca0-bb93bd63bdf7 |
[
{
"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"
} | 9e80afc6-5a30-4b29-9d61-d1093c5734c8 |
[
{
"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"
} | 9c6ddf78-429e-4ad8-9f74-8b23cbd5cbed |
[
{
"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"
} | 17b181a2-ab4d-41ac-bf9e-43dda73a78fd |
[
{
"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"
} | ba736cb4-62b1-4e1a-a1da-47f367fece2a |
[
{
"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"
} | 3113d7a4-2a59-4878-a93a-482f4c6dcbd7 |
[
{
"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"
} | 03ed6b9c-ba5c-4820-b204-566032d5373d |
[
{
"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"
} | 2227e2ff-68bd-4491-bac6-fff5e5cf5b63 |
[
{
"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"
} | 6b6a5613-a999-465c-a809-fd9a9b8eacee |
[
{
"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"
} | 39f779e6-c6d8-48c4-a152-2893bac14ce8 |
[
{
"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"
} | 5ff1b62a-e3ba-4324-b248-79b9778c364b |
[
{
"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"
} | 86ab048c-4802-4d27-8f59-e3b0a7b6bb7b |
[
{
"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"
} | abfc1912-0804-45cb-abb5-e32c2ff0b8fd |
[
{
"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"
} | 10aacf2a-d2e0-4ddb-8419-32e4c0178908 |
[
{
"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"
} | 6bbbdb87-df41-4ec4-906f-57f103f85686 |
[
{
"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"
} | 71d1c08d-08bc-477b-b113-a8bd7ec234b9 |
[
{
"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)"
} | 427ca5a8-c113-4c86-93ae-c40b8c3a23f5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.