conversations listlengths 2 2 | metadata dict | id stringlengths 36 36 |
|---|---|---|
[
{
"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"
} | 466d7e70-840d-4ce4-8025-ded86b4564ae |
[
{
"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"
} | 710fd2a8-bbad-4088-a862-0fbe398d2fc1 |
[
{
"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"
} | 8dd2ec75-1763-4e62-9782-77bc70397f6b |
[
{
"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"
} | 9025c781-7895-4bcc-a083-ed5366f1d9fa |
[
{
"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"
} | 2af17e60-ba1a-4e7e-9799-be94c6fce0cb |
[
{
"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"
} | 8304be48-1e01-4d7a-99b6-989449fa8438 |
[
{
"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"
} | 51b7a47b-834a-4788-889d-61872469daff |
[
{
"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"
} | c70ef44a-18ef-4fee-983c-b2ac2ffc70af |
[
{
"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"
} | 715a9ef6-7321-411b-bd86-76f93d2b8ccb |
[
{
"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"
} | 580f451d-523f-4997-8a05-396f637843fe |
[
{
"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"
} | d7f36d86-40f6-4810-847f-244cb8648262 |
[
{
"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"
} | c4d0b648-e1ba-4ca1-8ad6-7489bc59507e |
[
{
"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"
} | e4b8ecd1-5982-4272-a7fe-267631f4ea3b |
[
{
"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"
} | 3ba16465-87d7-48ae-9786-8d646b1aec05 |
[
{
"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"
} | 7e1041cc-6eb7-4e69-b6cd-5c432094748d |
[
{
"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"
} | c2b25824-5d20-4431-bd84-f7cee9d6a599 |
[
{
"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"
} | 07586910-f485-4cf6-ae71-28f789854a26 |
[
{
"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"
} | 7d0c02eb-fc71-41e8-8fb7-00c09d5e2e99 |
[
{
"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"
} | 2d65dd11-a82c-42b7-9a72-284079370be8 |
[
{
"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"
} | f7999b48-2a25-4b5e-9687-7ff698b675fc |
[
{
"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"
} | c961db07-8c70-45c2-9cf0-5a30ce6ed657 |
[
{
"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)"
} | 2e10c417-4626-4050-afe2-18f04cddd82c |
[
{
"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)"
} | 9f8fe20f-b24b-4acf-bf5a-4189d48e4251 |
[
{
"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"
} | 55d72fb4-a127-47b8-932b-7f12528dd6d1 |
[
{
"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"
} | 095d14c7-6d78-4a1a-ac68-f5d0237ac66a |
[
{
"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"
} | 52135883-da85-424a-8053-1c21b1d9552c |
[
{
"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"
} | 3ec85f91-742d-4c3c-98c5-758a8da4726d |
[
{
"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"
} | d3b3ec92-8742-49da-87e3-ce618f2d97e6 |
[
{
"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"
} | af6371d8-b4f1-4c34-b1b4-8381e2fa3fae |
[
{
"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"
} | db91c05c-3c95-4c70-9bd6-39c18dd6ad04 |
[
{
"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"
} | eac43d9c-d5d6-4bab-8fcb-0eac95c46b62 |
[
{
"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"
} | 43543f9c-84cc-4e36-bcde-70ef99698e51 |
[
{
"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"
} | f6750f38-6825-4dd5-8370-e443cdff6f55 |
[
{
"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"
} | 8b05d3c8-2374-424c-afdf-158ef08f1e6b |
[
{
"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"
} | f74b253c-e0f4-4740-b55e-d52631c30a05 |
[
{
"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"
} | 69c8f44f-6a2c-4946-b3d5-b0fb4e47ad6a |
[
{
"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"
} | 3648b64d-93ee-483b-b254-e795d52ca875 |
[
{
"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)"
} | f45b835a-f591-4db2-8162-e3f36ff0d186 |
[
{
"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"
} | 3d0c3afd-f24b-404a-b272-12fca1750669 |
[
{
"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"
} | 0541d4ee-8b1b-4b47-8931-34632443e8d0 |
[
{
"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"
} | 1fdd9eee-91b8-487c-a2fd-2988fd4bac1e |
[
{
"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"
} | 31aea682-80c6-4b9c-9f60-026bc1524012 |
[
{
"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"
} | 3998de73-f122-4d41-b623-2c5bca66fc38 |
[
{
"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"
} | 3be3f8e3-9091-4f0e-8af2-c26f50b8a4b7 |
[
{
"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"
} | 108563e6-5ffb-4d33-98a8-45e27fae39fb |
[
{
"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"
} | 462014c9-7884-4c1c-8932-7529750bf344 |
[
{
"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"
} | d11f5ffc-80bf-4f0f-a93b-28c92fc3a485 |
[
{
"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"
} | 54879057-dc81-497a-a029-6f2520f0bdca |
[
{
"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"
} | daee4cce-f735-4319-a2bd-ed7154849e96 |
[
{
"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"
} | 2ae5b754-be5b-4aba-aa2f-e51915698ae0 |
[
{
"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"
} | 3ebb4393-9f26-4647-ba7c-efc077423957 |
[
{
"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"
} | 4f1caddf-e429-49a1-b01f-d345fa565075 |
[
{
"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"
} | c8d4eb6a-e3fd-47d2-9f9b-87d4250eab53 |
[
{
"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"
} | 921a25bc-eb94-419d-8088-b26a79ab3f75 |
[
{
"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"
} | f16c0360-f8c9-4cb5-920c-5abc7bcfd8dc |
[
{
"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"
} | 4c5c809e-e11d-47f5-8b65-264d3ff4c3a3 |
[
{
"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"
} | 0c75cf8a-9693-49e6-ae7c-11087f22614e |
[
{
"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"
} | 0d6508a7-b284-475b-bd24-4b6cff154e08 |
[
{
"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"
} | 8142a489-c0cc-411c-8f93-ddd213c5314b |
[
{
"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"
} | 09115288-d9dc-41d8-a9ec-424db936e58c |
[
{
"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"
} | 7269e205-983a-4167-bf4e-616bc0f4c3b1 |
[
{
"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"
} | 0608ce6e-49f4-4067-9372-7b315e23dff0 |
[
{
"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"
} | c2375cb7-220c-4aac-9e86-27d8d2d8f7a8 |
[
{
"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"
} | 505440d2-17a9-426a-8668-01a2f83ff875 |
[
{
"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"
} | 9633779d-200f-4968-aab9-553b3eaae7b2 |
[
{
"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"
} | 3f235386-4e7f-4e84-bd4e-127507731dd8 |
[
{
"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"
} | 548d1c32-542b-4a29-a613-6276f18999b7 |
[
{
"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"
} | c8d8a80e-0c61-4ff5-9e8e-4c45f6941786 |
[
{
"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"
} | 500d346d-b5cf-4ce0-9e4f-2fe1446b5b2f |
[
{
"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)"
} | f719454f-6b35-48e3-a657-89ca6b6921ba |
[
{
"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"
} | 5b1cfdb9-c203-4136-923a-f20defa6d004 |
[
{
"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"
} | 4f3ce480-813b-4192-8388-66c5dda7b21b |
[
{
"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"
} | ff6f064a-945a-4895-9bd9-03ab55f7d51d |
[
{
"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"
} | 094ce247-62fb-4517-af9c-ae92768c1a74 |
[
{
"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"
} | cf19114b-1de7-4214-8bdf-8b19cfb5551b |
[
{
"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"
} | 4730a039-70f4-40fb-8efe-78c963315666 |
[
{
"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"
} | 9402300c-8e65-4ae5-a60d-c3b7a80988a9 |
[
{
"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"
} | 1b9801d2-6163-4743-8b16-2aa77356ac0c |
[
{
"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"
} | 56b90271-f9a4-4bdb-8bc9-7b743767a0c0 |
[
{
"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"
} | b2ac82e7-d78d-473b-a487-235e78ce773d |
[
{
"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"
} | 9c96d93e-92cb-403f-b631-4acda709ed5e |
[
{
"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)"
} | 88031dd5-9c23-4d03-8822-f7b8a44b6ab1 |
[
{
"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"
} | 0248b4f3-02ed-4b05-8bc0-16daade59d36 |
[
{
"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"
} | 83886463-6128-4600-af29-ad6fe3350959 |
[
{
"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"
} | 37e50012-fa5b-41ce-99dc-8085ca9d9cd5 |
[
{
"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"
} | 8dbd2e2a-e11f-40c5-a6b5-46cb7e74912e |
[
{
"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"
} | 4adaf3cc-8c30-435c-929f-72e170aa083a |
[
{
"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"
} | 0a94156d-f7a4-4266-9203-ea48e2fbb591 |
[
{
"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"
} | 1222bc37-3ddc-4ed4-8a26-c0fc5c22722c |
[
{
"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"
} | 4a475562-bfaa-415d-b749-d739dfa83a70 |
[
{
"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"
} | 1858b39e-e5e9-4da6-904a-9acefc063fae |
[
{
"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"
} | 8146dceb-609b-42c4-aafa-3dd09836abc8 |
[
{
"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"
} | 9de99783-0ebb-41e3-b6c4-7172c09ce6b4 |
[
{
"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"
} | 6e108258-0355-4126-abf4-fecdd31b9836 |
[
{
"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"
} | 3ae7e103-d2a1-40fd-82c2-3ea764843770 |
[
{
"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"
} | 23de5ffb-ff15-4401-ab89-66e0ca3ac1a9 |
[
{
"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"
} | 1da9cb99-e7ff-42da-805f-10b5a2bd31c5 |
[
{
"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"
} | cdef9b69-5aff-4474-b072-7e590fc7ef05 |
[
{
"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)"
} | a8062638-d426-4203-bfea-0a19bb3317a8 |
[
{
"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"
} | d08f8c85-9750-438d-b814-2b77986f52da |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.