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
- 321.Create Maximum NumberHard
- 327.Count of Range SumHard
- 329.Longest Increasing Path in a MatrixHard
- 332.Reconstruct ItineraryHard
- 335.Self CrossingHard
- 336.Palindrome PairsHard
- 352.Data Stream as Disjoint IntervalsHard
- 354.Russian Doll EnvelopesHard
- 358.Rearrange String k Distance ApartHard
- 363.Max Sum of Rectangle No Larger Than KHard
- 391.Perfect RectangleHard
- 403.Frog JumpHard
- 407.Trapping Rain Water IIHard
- 411.Minimum Unique Word AbbreviationHard
- 420.Strong Password CheckerHard
- 425.Word SquaresHard
- 432.All O`one Data StructureHard
- 440.K-th Smallest in Lexicographical OrderHard
- 446.Arithmetic Slices II - SubsequenceHard
- 458.Poor PigsHard
- 460.LFU CacheHard
- 465.Optimal Account BalancingHard
- 471.Encode String with Shortest LengthHard
- 472.Concatenated WordsHard
- 480.Sliding Window MedianHard
- 483.Smallest Good BaseHard
- 488.Zuma GameHard
- 489.Kth Smallest InstructionsHard
- 493.Reverse PairsHard
- 499.The Maze IIIHard
- 502.IPOHard
- 514.Freedom TrailHard
- 517.Super Washing MachinesHard
- 527.Word AbbreviationHard
- 552.Student Attendance Record IIHard
- 564.Find the Closest PalindromeHard
- 568.Maximum Vacation DaysHard
- 587.Erect the FenceHard
- 588.Design In-Memory File SystemHard
- 600.Non-negative Integers without Consecutive OnesHard
- 629.K Inverse Pairs ArrayHard
- 630.Course Schedule IIIHard
- 631.Design Excel Sum FormulaHard
- 639.Decode Ways IIHard
- 642.Design Search Autocomplete SystemHard
- 644.Maximum Average Subarray IIHard
- 656.Coin PathHard
- 668.Kth Smallest Number in Multiplication TableHard
- 675.Cut Off Trees for Golf EventHard
- 679.24 GameHard
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.