conversations listlengths 2 2 | metadata dict | id stringlengths 36 36 |
|---|---|---|
[
{
"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"
} | d93476e6-d023-4052-aaf9-78f1ff90d6f3 |
[
{
"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"
} | a5fc0620-273c-4104-a6b0-90027efca201 |
[
{
"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"
} | fcf17d88-dde5-4360-a694-f9e58ebfeecf |
[
{
"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"
} | cb0e2000-535b-4273-92af-d130e86cffa0 |
[
{
"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"
} | 8eeb4fb3-62fe-494f-b3d9-615ed31bcc2c |
[
{
"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"
} | 2160609c-3e12-48ed-9d88-34fb8369b06b |
[
{
"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)"
} | 880f69d2-fe4a-494b-8f5d-626c2b8a3998 |
[
{
"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"
} | 5e5552e4-da9c-4a66-bf40-1ff8df027cb3 |
[
{
"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"
} | b7060cfb-131a-40f5-916b-8ef31d811cdd |
[
{
"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"
} | 055fff5f-8edb-49fa-922a-aa73522d8632 |
[
{
"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"
} | 00ee6dda-f679-45e8-b1f9-3398d314f6f6 |
[
{
"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"
} | ae436441-c08d-4d2d-9787-1dc4800de9f8 |
[
{
"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"
} | c7035db6-ac46-4213-9cba-8952a6550bfa |
[
{
"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"
} | 7da1955f-85aa-429d-ae1a-cc51421c6f50 |
[
{
"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"
} | 374328d8-70e3-48f5-a729-15fbee5d1833 |
[
{
"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"
} | 9ad0e2b5-5823-4261-abc9-38c555f83e91 |
[
{
"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"
} | f0b96a30-bcc6-43db-821b-13cfb38c6fee |
[
{
"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"
} | e1aabcfb-70ed-45c2-87ac-ef3528483e94 |
[
{
"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"
} | 070663bf-0cfa-417e-8418-cac69f4aa74f |
[
{
"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)"
} | 3d1d2d92-0879-4266-b61e-83e237ae6b46 |
[
{
"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"
} | c54ea951-2a9e-4d0e-a888-a829e4092b5f |
[
{
"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"
} | 1279985a-eb33-48bc-9d99-b264cccb356b |
[
{
"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"
} | 92e4f44d-9a9c-41f7-980a-8d5bfc0f7d71 |
[
{
"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"
} | 84d01229-d781-4114-bb90-203a0d9fb57a |
[
{
"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"
} | c0617a72-844c-480b-8fa4-7df0db2bf947 |
[
{
"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"
} | ad0c3d12-0a1e-4fca-ac60-4b53aa15d4c9 |
[
{
"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"
} | 2a39b08a-e6af-46ed-a9fa-88fc6868e560 |
[
{
"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)"
} | 15aa948f-8656-4fb5-a308-a086643d51aa |
[
{
"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"
} | 4dbfd937-c43e-4ee2-a56d-8c976022ad7a |
[
{
"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"
} | db026d33-d8be-4633-a23b-a8e9512ff3ab |
[
{
"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"
} | f0c6041b-3e04-49ff-a1a0-558ace0a2b93 |
[
{
"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"
} | 0230d60e-8a85-4822-a3bd-cb352daacf08 |
[
{
"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"
} | 1839d145-c77d-4648-8d2c-ef23f084c7ff |
[
{
"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"
} | dcdd6c84-c5c0-4c70-bcc9-c7d105cfb2ea |
[
{
"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"
} | aee6cf02-a04b-498c-b973-f263732388e1 |
[
{
"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)"
} | f112877c-c12a-4a9d-867e-c48c8a513910 |
[
{
"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"
} | a133c482-2b84-4dad-8722-94376c87166c |
[
{
"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"
} | f7769de2-4132-4b39-8fb4-c4c5c6b528fe |
[
{
"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"
} | ecf4cf0a-5e41-453a-88b3-12a106268f12 |
[
{
"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"
} | 80dbacbb-c13f-424b-859c-51bae84bdf3c |
[
{
"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"
} | 2d0f0d16-3d13-4f24-bccf-9972852a5009 |
[
{
"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"
} | fd450102-e064-4443-a8b0-830aaa1d7501 |
[
{
"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"
} | 3f472a0b-e900-41fd-a555-a9dcc7623217 |
[
{
"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"
} | f8ebd8ad-e8c3-419e-949c-438be3b86eea |
[
{
"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"
} | 101835f9-2bee-4464-94d5-0233f38f04b3 |
[
{
"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"
} | 01eac79b-78c4-400f-b0b7-7e03e74b3aa2 |
[
{
"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"
} | faf27335-b175-4928-bd8c-2b7ccb9aa981 |
[
{
"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)"
} | 45d75c2f-26c0-4cd5-8cdf-36236daf55c0 |
[
{
"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"
} | febe720f-d1e2-4273-8933-be7453bfb342 |
[
{
"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"
} | 94326ee5-da07-4522-96f5-3e1795995f16 |
[
{
"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"
} | 01e353f9-ef4a-46c5-a278-fadcc10c5c67 |
[
{
"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)"
} | d1aca92e-5e7b-4800-aa11-ad4b6f550fc5 |
[
{
"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"
} | 57e38aa7-f2c0-48f4-b94c-3fcc98eef2a0 |
[
{
"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"
} | 0c49e6af-1221-41d2-8eb9-7da5fa9459fd |
[
{
"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"
} | 79a9fc4b-45f9-4540-8554-62b04570d9a3 |
[
{
"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"
} | b43933e6-3132-4950-9697-a168fb3d73e6 |
[
{
"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"
} | cfcff57b-aaa8-4b79-91ea-37bccd8a21bf |
[
{
"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"
} | 030937fa-b311-4413-aebd-e53c95b36a44 |
[
{
"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"
} | f3e726fb-b868-4878-bfa7-db29ea5999f6 |
[
{
"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"
} | 0c199898-51b7-4f0c-a011-95832654b18c |
[
{
"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"
} | db5dc294-653e-4634-98b6-d8955bd48ca0 |
[
{
"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"
} | 61b2b0be-bd77-418d-9e35-0e73ff2bfb58 |
[
{
"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"
} | ebed1c6d-8d08-4d40-b310-7d2ce50cc0f2 |
[
{
"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"
} | bdb4bb97-31b3-45f9-92db-b1cb7624f726 |
[
{
"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"
} | cb501fe8-016b-432b-b20c-346d734b9308 |
[
{
"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"
} | 0566f4bc-ba48-4c9f-bd42-0372148390e2 |
[
{
"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"
} | b5072abf-44a4-474f-bfc8-7f031b13ae5a |
[
{
"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"
} | afb87fb7-6cb9-46c6-9875-7ad6360fe949 |
[
{
"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"
} | 348d6b81-a360-4a57-8dab-3f2533bf4c22 |
[
{
"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"
} | 680447f0-1384-4383-a708-8a1633e77762 |
[
{
"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"
} | d6ce1dc4-c78f-49bf-9bad-05fd6751f8fd |
[
{
"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"
} | 00845b63-ba16-49fc-bca1-c7c74d792404 |
[
{
"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"
} | 821981b3-ecec-4d38-9372-2ca8835e430f |
[
{
"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"
} | 738a7588-15f0-4396-b99a-5358e9281d23 |
[
{
"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)"
} | 0a9ae640-f147-4040-8d78-5c0ac8e5ab99 |
[
{
"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"
} | a391ca2d-f1fd-4112-b5bb-959a1493f0c0 |
[
{
"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"
} | 49c2e583-f474-40e5-a781-719b6470e063 |
[
{
"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)"
} | b6cfd557-8bc2-434e-8233-4a900b47e1b3 |
[
{
"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"
} | 1b51ba41-cea4-41cd-add9-acd30c0f8997 |
[
{
"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"
} | 35acc51e-5a70-4263-9ebc-2b035a74ca1e |
[
{
"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"
} | 4338ecd0-c802-407d-bdeb-b31b17df2447 |
[
{
"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"
} | efaaaf88-35fc-402a-bf06-c1ad35b87ebd |
[
{
"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"
} | 0654a345-fecf-419f-a028-05541e9ae539 |
[
{
"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"
} | 3c230d41-e77d-4cc7-96f4-e1739bc13bfa |
[
{
"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"
} | 0a62bda7-00f2-4ce5-893f-b11e890a9bf4 |
[
{
"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"
} | 738c0357-bbe0-4546-95ba-511164894dc2 |
[
{
"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"
} | 3ec3d86b-f38f-4dc2-97c1-9355153ad273 |
[
{
"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"
} | 79ce738c-45e5-47e9-b8ed-b3fa7b462018 |
[
{
"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"
} | 1db6ea77-bc56-4787-9db7-93d41abbb5ce |
[
{
"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"
} | 9d6bd902-2c34-495e-9adb-c208dae212b6 |
[
{
"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"
} | 8b5585d4-72df-427c-b9e0-b1e884ffc3ba |
[
{
"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"
} | 5c3e77cc-4225-4c2c-a3e8-80beb5c5367a |
[
{
"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"
} | fa864bfb-4561-4022-a287-1cfcc88908ae |
[
{
"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"
} | d2961e00-6db7-4e33-bcb3-6f4c2f9a399d |
[
{
"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"
} | cab8d089-81a0-4288-a041-a1a24a608ba0 |
[
{
"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"
} | 5bfa0240-2924-4f0d-b73d-71738c71cb6f |
[
{
"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"
} | 6dd5ecd0-058d-4985-a1e6-a510eeb81d89 |
[
{
"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"
} | 498ed754-6fdd-43fc-a781-2712397495df |
[
{
"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"
} | 95ee686a-503c-4597-8630-9d979755ab41 |
[
{
"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)"
} | de4f4585-0885-4936-919a-89eed729c9f3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.