conversations listlengths 2 2 | metadata dict | id stringlengths 36 36 |
|---|---|---|
[
{
"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)"
} | a1b39938-744a-4c6a-a6b2-0864fe9a6cac |
[
{
"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"
} | 9e134606-8e73-4377-993c-4d28d323d734 |
[
{
"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"
} | c2be3991-8b6f-47bd-805a-5ed7e3e8baec |
[
{
"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"
} | afd7bcf7-7c7d-45c4-90af-f5eb97aaf9ae |
[
{
"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"
} | 1f7d5658-bf5b-49f7-a7ec-cad622e328f9 |
[
{
"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"
} | 965e1faf-4ad1-4b1e-9982-fa8a420db431 |
[
{
"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"
} | d7d2cac0-9b58-48dc-9758-fede646d5a39 |
[
{
"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"
} | 1860b11b-a8fa-4c1b-bf6a-c6872de917e3 |
[
{
"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"
} | 64264183-100f-4975-9cc2-c626796026cf |
[
{
"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"
} | 5e1d74de-40eb-445e-aa44-6e6c09573791 |
[
{
"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"
} | bf449833-9b74-4e4f-8937-b42997d757c9 |
[
{
"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"
} | 7f348e1a-c91a-43b1-aafd-acb2e3c21cb9 |
[
{
"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"
} | b6c4c0d5-f8ff-47c7-bc32-56f95ae4a3ea |
[
{
"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"
} | ae9a0057-680e-41f3-8be2-37c3151650fa |
[
{
"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)"
} | e27adf99-4e33-41ca-ab8b-6c5c5952c47b |
[
{
"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"
} | 9f8354ad-dde3-4ea1-9849-67ec673e8460 |
[
{
"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"
} | 97c5d14c-880e-48b2-85e2-215a05959eb2 |
[
{
"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"
} | 48b425c7-7adb-496c-8444-a83df256fe01 |
[
{
"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"
} | b527a769-fa2d-4bb3-a553-e9fff025d9ea |
[
{
"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"
} | 6c0bbc71-9308-4454-91c2-25669f3d08db |
[
{
"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"
} | d221f478-c0cb-4694-8c5e-db3efdd0dd28 |
[
{
"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"
} | 7e96675a-d0db-40d3-93c9-dc67ebde1cc0 |
[
{
"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"
} | 02f98fd3-f96a-459b-8b80-4cec912fdd7c |
[
{
"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"
} | 8d6dbaad-c033-4b89-a1e4-bbb71139a082 |
[
{
"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)"
} | 2779d8bf-a964-46ba-8a33-4cb1d0fc4c8b |
[
{
"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"
} | a5e3fa1b-7aa0-4733-b54b-7318c0140105 |
[
{
"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"
} | e3fad15d-96c3-4447-84a8-bf880607c145 |
[
{
"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"
} | 605dc02c-8d3d-430a-a995-5fd5255c907d |
[
{
"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"
} | 20613908-d938-43d7-9295-e1a3d00fd87a |
[
{
"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"
} | 9787118b-588c-4dd0-a2b9-a74a060f3c39 |
[
{
"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"
} | 16cc75fe-9f9c-4376-b804-1ba1186183ac |
[
{
"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"
} | 0578d7e3-ff5f-4d1c-8f58-a137e9688f4d |
[
{
"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"
} | 5bfc79be-ed3f-4ceb-b290-29a209085a09 |
[
{
"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"
} | 1908b556-cacb-4168-8a79-c58787979342 |
[
{
"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"
} | d82e9e51-bf80-4d53-bfe6-1b821f7c3a91 |
[
{
"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"
} | 5b79163b-a893-4461-bfcf-c09126c75043 |
[
{
"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"
} | 2f7a672f-fdd3-4e01-a777-dc6309dbcd0a |
[
{
"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"
} | 54716598-0485-4380-a9a5-58e37b67c88c |
[
{
"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"
} | 7e0c4f01-b9fb-4763-8f6b-c8eeaf115bad |
[
{
"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"
} | e4c26ae1-9285-4f66-8ef1-c79a6c460fa5 |
[
{
"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)"
} | 6317372a-14a1-4bb2-943c-15483b9309c7 |
[
{
"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"
} | abc0028a-b574-49d5-a0aa-5a56d85f0f1a |
[
{
"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"
} | 6b35a29e-04f9-435d-b19f-e40b117e3b75 |
[
{
"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"
} | c30e55a0-c73b-424f-b506-f4b53ade32ae |
[
{
"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"
} | 5aa88bd3-594f-4491-96fc-5784a627dae5 |
[
{
"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"
} | 3c681303-0cc5-419b-83c7-bfeaf3c42266 |
[
{
"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"
} | eb1e1d42-ede5-440f-ae19-069d3cd0eabb |
[
{
"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"
} | 70f9df9a-5091-478b-8515-53e042127e6a |
[
{
"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"
} | 4485ca9a-fc08-4817-9fb9-15e69469dcb0 |
[
{
"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"
} | a72b8573-3c55-4430-a28a-758e2a64c577 |
[
{
"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"
} | 03d28c12-6d39-4bfb-bc86-88b7c90948be |
[
{
"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"
} | e72729d3-3401-44ab-bd0c-510002e77eaf |
[
{
"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"
} | b1c73cfa-6895-4c9a-8c6a-2a7087867951 |
[
{
"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"
} | 2b20786a-6b5c-40c8-acf6-60fbbb8f2d2a |
[
{
"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)"
} | c4eabeed-4efd-4ed4-a768-2d93b54c136a |
[
{
"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"
} | 6b030d33-56a1-40b9-aecb-4209a75200ac |
[
{
"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)"
} | 400c9dc8-63ad-4b1d-b0f9-0566abf9f119 |
[
{
"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)"
} | 4535e8d6-74ea-4a0a-bfe6-51003d98f62c |
[
{
"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"
} | 9e812828-4802-4037-a549-ad564fdb70b1 |
[
{
"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"
} | 07c276dc-48d4-4c06-9e23-5af3ebb6d85f |
[
{
"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"
} | 7105e507-ee2f-4424-a0b0-d5d7a99bce73 |
[
{
"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)"
} | 8eb3408b-8588-42ff-becb-6d20e865720d |
[
{
"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"
} | b4298dd3-54d0-4afc-947c-47b6e35b3404 |
[
{
"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"
} | 1703a39c-f9d2-4ace-b790-2aa312edcaf5 |
[
{
"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"
} | a05df805-13f6-43b4-b3d2-424b8f132a8e |
[
{
"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"
} | 093a8ab0-4a5f-4a95-ad18-c533359922d4 |
[
{
"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"
} | 245f2b01-c492-4ad2-9ffb-007fb09a67bc |
[
{
"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"
} | 83e14692-c318-4449-baa2-80152d797ac3 |
[
{
"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"
} | b472c1fa-2374-4899-b71d-3c6f4114182c |
[
{
"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"
} | 4bcedc31-53aa-43bf-9061-21890c4fe07d |
[
{
"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"
} | 83f9fb37-3db5-46a9-8750-0d72b2ebd4e9 |
[
{
"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"
} | 900b63ed-ecb1-4135-818e-e1e0c285a40b |
[
{
"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"
} | 21f5a3db-3163-4a51-bc67-e5e1ded51dc8 |
[
{
"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"
} | 9be9ac86-6bdc-41dc-99f6-db90ab848bc7 |
[
{
"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"
} | 005f8f07-3ee0-4a3e-96a2-13cc14f96791 |
[
{
"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"
} | b35c79ec-5a5e-4b32-b190-1ec8d31ca739 |
[
{
"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)"
} | 511b96a7-5ba7-4746-a707-312df06b1b71 |
[
{
"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"
} | ed8633dd-e9a9-49a4-bc70-981aaf1db2ed |
[
{
"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"
} | 7757be2e-ea1f-4e8f-9aca-b848e814f865 |
[
{
"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"
} | c78cadb4-0625-456b-90ea-1f9198d9badb |
[
{
"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)"
} | 4aa5f47e-b8fd-4763-98b4-d5bc8b30c65e |
[
{
"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"
} | bb49b653-f8c4-41a7-9623-27041b2fe448 |
[
{
"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"
} | c9c4a2bd-67ca-4ac8-b45c-cb1e7318787e |
[
{
"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"
} | da372cec-9684-4ee5-a0cf-e6b03efe0ff5 |
[
{
"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)"
} | 562af35d-5163-4c17-8185-7f7a86351b3d |
[
{
"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"
} | 3e35cbdb-597c-4842-a8ed-a2876cdcc3e0 |
[
{
"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"
} | 7fcfcf28-5794-4e83-bf35-07345f01ea3f |
[
{
"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"
} | dda3a20f-42e8-4bba-aeb9-319b417e42c4 |
[
{
"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"
} | 140bded5-2f8a-41eb-a636-4d5809c3dff7 |
[
{
"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)"
} | e33651aa-7319-4c2b-88e1-dc89ea1d112e |
[
{
"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"
} | 5b4d17e6-1b4d-4ab2-9fd2-1f83e9d46fe4 |
[
{
"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"
} | f9177a36-b4f4-4475-8136-a9718212224a |
[
{
"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"
} | 587aa47a-74f3-42bd-813d-12d95de2c661 |
[
{
"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"
} | cfa6f867-66a3-407c-918f-b340eaed2584 |
[
{
"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"
} | 3b0398bb-2f2b-4269-ba4d-ea2e5ea6430a |
[
{
"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"
} | 9b37eaa7-76c4-4a84-ab98-9c5b9b3d8419 |
[
{
"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"
} | 0507295b-4da3-4835-88c5-43a5262abdd2 |
[
{
"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"
} | b4f6e4a1-bb26-4417-8ac9-8fde3795f283 |
[
{
"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"
} | 3f4a964b-8827-4492-9d41-dcd39a10e907 |
[
{
"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"
} | c64f8e79-24ea-4dcf-b468-d85aa0f00e63 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.