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.
432 answers
- 402.Remove K DigitsMedium
- 406.Queue Reconstruction by HeightMedium
- 416.Partition Equal Subset SumMedium
- 418.Sentence Screen FittingMedium
- 419.Battleships in a BoardMedium
- 421.Maximum XOR of Two Numbers in an ArrayMedium
- 423.Reconstruct Original Digits from EnglishMedium
- 424.Longest Repeating Character ReplacementMedium
- 433.Minimum Genetic MutationMedium
- 435.Non-overlapping IntervalsMedium
- 436.Find Right IntervalMedium
- 437.Path Sum IIIMedium
- 438.Find All Anagrams in a StringMedium
- 442.Find All Duplicates in an ArrayMedium
- 443.String CompressionMedium
- 444.Sequence ReconstructionMedium
- 445.Add Two Numbers IIMedium
- 447.Number of BoomerangsMedium
- 449.Serialize and Deserialize BSTMedium
- 450.Delete Node in a BSTMedium
- 452.Minimum Number of Arrows to Burst BalloonsMedium
- 453.Minimum Moves to Equal Array ElementsMedium
- 454.4Sum IIMedium
- 456.132 PatternMedium
- 457.Circular Array LoopMedium
- 462.Minimum Moves to Equal Array Elements IIMedium
- 464.Can I WinMedium
- 467.Unique Substrings in Wraparound StringMedium
- 468.Validate IP AddressMedium
- 469.Convex PolygonMedium
- 473.Matchsticks to SquareMedium
- 474.Ones and ZeroesMedium
- 475.HeatersMedium
- 477.Total Hamming DistanceMedium
- 481.Magical StringMedium
- 484.Find PermutationMedium
- 487.Max Consecutive Ones IIMedium
- 490.The MazeMedium
- 494.Target SumMedium
- 498.Diagonal TraverseMedium
- 503.Next Greater Element IIMedium
- 505.The Maze IIMedium
- 508.Most Frequent Subtree SumMedium
- 509.Inorder Successor in BST IIMedium
- 510.Count Subarrays With More Ones Than ZerosMedium
- 511.All Paths from Source Lead to DestinationMedium
- 512.Maximum Alternating Subarray SumMedium
- 513.Find Bottom Left Tree ValueMedium
- 515.Find Largest Value in Each Tree RowMedium
- 518.Coin Change IIMedium
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.