conversations listlengths 2 2 | metadata dict | id stringlengths 36 36 |
|---|---|---|
[
{
"from": "human",
"value": "**Longest Substring Without Repeating Characters** (Medium)\n\nGiven a string `s`, find the length of the longest substring without repeating characters.\n\nPlease provide a solution in python with a clear explanation of the approach, time/space complexity, and any important edg... | {
"category": "sliding_window",
"difficulty": "medium",
"language": "python",
"title": "Longest Substring Without Repeating Characters"
} | 144680d3-6f50-4d18-987b-56acdd2d7c1f |
[
{
"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"
} | d2f7f396-9684-47f7-adb7-04e0312505b2 |
[
{
"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"
} | bab5da57-61df-4dc3-bf99-17ff2e38f7aa |
[
{
"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"
} | a8402d6c-6283-4c00-bd43-ed6df1805bd1 |
[
{
"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"
} | 09287bd2-cc8f-4a75-ade5-0e3e0aeba04a |
[
{
"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"
} | cb1ed313-db1e-4798-bacb-05f50dd249f9 |
[
{
"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"
} | 245bc460-9076-4a1f-8280-a4cca270df38 |
[
{
"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"
} | fc4b6639-4730-480f-8431-57403f5ede4c |
[
{
"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"
} | 349ceb57-760f-4d5a-b0a6-a8086c4faf9a |
[
{
"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"
} | d74a312d-92a6-476e-9d7c-0acd428266d5 |
[
{
"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)"
} | 76ae8ecc-43c4-47bf-b1fe-d0449ba9fa9f |
[
{
"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)"
} | b31d24d5-dc68-494a-9fc5-d3fb46604700 |
[
{
"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"
} | e5e61388-01b7-40cb-897c-c28146fabba1 |
[
{
"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"
} | b887a66c-b5dc-4753-a470-09614e3f510e |
[
{
"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"
} | b0f86d4f-63d2-43bb-acc6-e842b050b6d0 |
[
{
"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"
} | 92c23c84-095c-4602-ad46-a9ac97bb240e |
[
{
"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"
} | c7be79af-16d8-43bb-91d8-5358d0b1eaa4 |
[
{
"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"
} | 53355e04-bcc5-419d-ad0f-ec8d3d6437c5 |
[
{
"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"
} | f0c8f8ad-6074-4a2e-8dce-c52c9d628503 |
[
{
"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"
} | 72a66cea-0ca7-4a44-b8b9-b111a6d25a1f |
[
{
"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"
} | cb65f0cf-5e82-467e-9e01-0c3013349359 |
[
{
"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"
} | 7066b69d-08a4-4ded-b90d-cb537fad58b7 |
[
{
"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"
} | 898c394c-406d-4005-ac67-9d48c9218b58 |
[
{
"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"
} | a2059ba8-f2e6-4792-a376-184b94297e77 |
[
{
"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"
} | c02bb3cf-8279-468f-8227-f76d353abb84 |
[
{
"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"
} | f758cf12-a8ab-42af-a352-e6f90d96553b |
[
{
"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"
} | 48d392bb-2b63-4751-8f4c-aaa2aa77e5dd |
[
{
"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"
} | 3551dd6d-6b04-49b5-a1bf-1f488831a19a |
[
{
"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)"
} | bdf574dd-e1f1-4e7e-b495-0c780a6a0b01 |
[
{
"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"
} | 3c799d64-0ae4-4ebb-a722-fbb483d66e8d |
[
{
"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"
} | c074d5a4-e3ad-4980-9e52-996d42da2d23 |
[
{
"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)"
} | 36d19e69-fea0-475e-8f90-aeb4b8e9f869 |
[
{
"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"
} | 889f42be-f319-4219-9ae3-6934819d90a3 |
[
{
"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"
} | 72539455-9cbc-4a16-af00-a686d55e5364 |
[
{
"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"
} | fcbcdafa-6b64-4fcc-b945-12ada3d182d0 |
[
{
"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"
} | 897cb0f3-4a84-4077-a1ec-71da136a9a09 |
[
{
"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"
} | 843ef291-4722-48de-936d-e3940336f77c |
[
{
"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"
} | db8ef584-65a0-4e52-b6b9-d60cc5e3169e |
[
{
"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)"
} | 5475b28b-790f-419f-ae0b-a9405243789f |
[
{
"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"
} | 7bafcc80-0be3-4ce2-9f61-ba88656174bf |
[
{
"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"
} | b4f2b727-082f-4636-b0cd-369bb6bae138 |
[
{
"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"
} | a77f9209-e17c-4ab7-b032-0812e726c904 |
[
{
"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)"
} | 476d7213-b64b-40ff-b3af-80af6241826f |
[
{
"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"
} | c9576099-7e7d-413f-8dad-75579b09b0e8 |
[
{
"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"
} | 8081d077-1243-41b9-91bf-92c1e9c68615 |
[
{
"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"
} | 5c09b95c-2593-410f-885d-9906f9717b2d |
[
{
"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"
} | 9ce5a4f0-7d12-43d9-8675-e265926abaca |
[
{
"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"
} | 6c237677-ab22-43c4-8006-b23f799d502c |
[
{
"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"
} | 6a873c50-875d-420e-bd9f-57d8f78bfa6c |
[
{
"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"
} | 33ca3a02-9781-4e31-a0ce-fc7be1b98993 |
[
{
"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"
} | cf688dac-239d-4cc9-aa8a-2725b75fee72 |
[
{
"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"
} | cf3a9e18-a6a5-410e-bdf4-2dd522c275f4 |
[
{
"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"
} | bde2842a-e69b-4b1e-a9fa-55538a4c2a23 |
[
{
"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"
} | 8c1ed0e6-20d1-4014-871a-66dbb877ca8c |
[
{
"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"
} | 8b8eb12f-dfa5-40c2-8f39-5bd52991d746 |
[
{
"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"
} | b9015fb7-2cb6-4b03-bb6f-a47a9e6c74b6 |
[
{
"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"
} | 95939888-ec70-4db1-81fa-cb302d3e2514 |
[
{
"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)"
} | d1a94597-c59c-4d07-b535-5627b96adcf8 |
[
{
"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)"
} | fb181055-a1a5-44b7-a0e9-c88c2fd68a2a |
[
{
"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"
} | f996aca8-38d4-40a8-b478-fc9dd19835e9 |
[
{
"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)"
} | 6071dcc2-3438-41c9-a43c-c770c3c83d65 |
[
{
"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"
} | 3f9c8f94-35b6-41c8-9312-2bbfdf1fd799 |
[
{
"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)"
} | 4e380668-1314-4783-b4a1-9a852c511e35 |
[
{
"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"
} | 7b6fd3f5-5bce-4e87-922d-e6d557ae92d3 |
[
{
"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"
} | a1d06fb5-cef4-4d7b-b850-dd798a9f0958 |
[
{
"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"
} | 1e120f81-fa77-48a4-9657-acb60461788d |
[
{
"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"
} | d440af3f-59f8-4648-b604-c7489efe46a1 |
[
{
"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"
} | 9d6b535e-70b2-4d4d-b577-80fa375cbdc0 |
[
{
"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"
} | e0bbbab6-efb5-4a09-b002-855c28fddb46 |
[
{
"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"
} | 29e9bae9-dd5b-44d9-bcd5-ca1a7ecb608a |
[
{
"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"
} | 7c08de2f-866b-4645-abce-e4c7aff36018 |
[
{
"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"
} | dbb3c094-f5c9-4fa8-9af8-82620b19e53d |
[
{
"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"
} | dae3d729-7352-4590-a18b-4668c8902343 |
[
{
"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"
} | 6477e717-1cb8-4e74-a168-3b8c68ac85dc |
[
{
"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"
} | 9c855ac4-8886-4702-b053-47df6979200d |
[
{
"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)"
} | 00f411a8-e9b1-403a-b7c4-bf626992e82e |
[
{
"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"
} | 6f09d5aa-be15-412e-ba41-5ff4f1d4b00f |
[
{
"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)"
} | abe18c11-2a35-4858-8876-e084b014a132 |
[
{
"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"
} | 3fe64ddc-93fb-4723-9a3e-abf6b3fecc66 |
[
{
"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"
} | 0fc106b4-d849-463c-a70c-f79b29f030b9 |
[
{
"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"
} | b4e6719a-06a0-4585-ae38-66942575d738 |
[
{
"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"
} | 52461f69-f0b3-477c-8270-64b248ee81fe |
[
{
"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"
} | dc898f05-31ba-4464-9b6d-061fda181e87 |
[
{
"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"
} | ac55fe68-f5e1-4599-a42e-a0d415003137 |
[
{
"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)"
} | 2f2badb0-9c6e-4b81-b626-6df402163d15 |
[
{
"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"
} | 5432e1e0-ba4a-4ff0-a46a-b5f70d9614e9 |
[
{
"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"
} | c55f69da-1cfa-46aa-b5d3-200b7b0689e2 |
[
{
"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"
} | 16007e20-07c1-46f4-8f63-59218f073a8e |
[
{
"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"
} | 12699c6c-08d5-4c05-8017-e17b1b906b05 |
[
{
"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"
} | 5b71bb08-381d-402e-b402-d1de728b8d68 |
[
{
"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"
} | 9f2bf807-f7d7-4241-bf23-71f169e3fcc5 |
[
{
"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"
} | 4f1c53ce-c008-4b20-91be-93ff0d005318 |
[
{
"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"
} | 49fb91e2-f0d2-46df-982f-35a0c60af96c |
[
{
"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"
} | 85cee538-39f5-4be9-ad41-1c04c1c7f1ec |
[
{
"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)"
} | 8bd7156e-a8b5-4c08-920c-c68922c438de |
[
{
"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"
} | 31543595-8e8d-4677-9a26-52ab39ea533d |
[
{
"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"
} | 7c48c7fb-cae2-495d-a81a-a3f4b8a3c22e |
[
{
"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"
} | 38c5b44e-c57c-4fcb-b0fc-17e8989fdb4e |
[
{
"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"
} | 57e3a956-720b-4fc5-af7b-8171b8c4aba2 |
[
{
"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"
} | 21dbb1b1-7715-40cd-843c-65e3d37c0314 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.