LeetCode
LeetCode Question Answers
How to solve LeetCode problems in a coding interview: the idea behind each solution and a working answer in Python, Java, C++ and TypeScript. Open the original problem on LeetCode, try it yourself, then compare with our answer. New answers are added every day.
156 answers
- 683.K Empty SlotsHard
- 685.Redundant Connection IIHard
- 691.Stickers to Spell WordHard
- 699.Falling SquaresHard
- 711.Number of Distinct Islands IIHard
- 715.Range ModuleHard
- 716.Max StackHard
- 726.Number of AtomsHard
- 732.My Calendar IIIHard
- 736.Parse Lisp ExpressionHard
- 741.Cherry PickupHard
- 746.Prefix and Suffix SearchHard
- 750.Contain VirusHard
- 754.Cracking the SafeHard
- 759.Set Intersection Size At Least TwoHard
- 761.Employee Free TimeHard
- 763.Special Binary StringHard
- 765.Serialize and Deserialize N-ary TreeHard
- 770.Couples Holding HandsHard
- 771.Encode N-ary Tree to Binary TreeHard
- 779.Max Chunks To Make Sorted IIHard
- 781.Basic Calculator IVHard
- 785.Basic Calculator IIIHard
- 787.Sliding PuzzleHard
- 798.Transform to ChessboardHard
- 809.Preimage Size of Factorial Zeroes FunctionHard
- 814.Smallest Rotation with Highest ScoreHard
- 819.Minimum Swaps To Make Sequences IncreasingHard
- 823.Split Array With Same AverageHard
- 828.Chalkboard XOR GameHard
- 833.Bus RoutesHard
- 836.Race CarHard
- 854.Making A Large IslandHard
- 855.Count Unique Characters of All Substrings of a Given StringHard
- 863.Sum of Distances in TreeHard
- 865.Robot Room CleanerHard
- 869.Similar String GroupsHard
- 873.Guess the WordHard
- 877.Shortest Path Visiting All NodesHard
- 884.K-Similar StringsHard
- 887.Minimum Cost to Hire K WorkersHard
- 892.Shortest Subarray with Sum at Least KHard
- 894.Random Pick with BlacklistHard
- 895.Shortest Path to Get All KeysHard
- 910.Nth Magical NumberHard
- 911.Profitable SchemesHard
- 918.Reachable Nodes In Subdivided GraphHard
- 923.Super Egg DropHard
- 931.Maximum Frequency StackHard
- 935.Orderly QueueHard
Beyond LeetCode
Real interviews also test system design, SQL, machine learning and behavioral answers. Practise those with KatInterview problems, browse by topic, or read our company interview guides.
LeetCode is a trademark of LeetCode LLC. KatInterview is not affiliated with LeetCode.