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
- 665.Non-decreasing ArrayMedium
- 666.Path Sum IVMedium
- 667.Beautiful Arrangement IIMedium
- 669.Trim a Binary Search TreeMedium
- 670.Maximum SwapMedium
- 672.Bulb Switcher IIMedium
- 673.Number of Longest Increasing SubsequenceMedium
- 676.Implement Magic DictionaryMedium
- 677.Map Sum PairsMedium
- 678.Valid Parenthesis StringMedium
- 681.Next Closest TimeMedium
- 684.Redundant ConnectionMedium
- 686.Repeated String MatchMedium
- 687.Longest Univalue PathMedium
- 690.Employee ImportanceMedium
- 692.Top K Frequent WordsMedium
- 694.Number of Distinct IslandsMedium
- 695.Max Area of IslandMedium
- 698.Partition to K Equal Sum SubsetsMedium
- 712.Minimum ASCII Delete Sum for Two StringsMedium
- 713.Subarray Product Less Than KMedium
- 714.Best Time to Buy and Sell Stock with Transaction FeeMedium
- 720.Longest Word in DictionaryMedium
- 721.Accounts MergeMedium
- 722.Remove CommentsMedium
- 723.Candy CrushMedium
- 725.Split Linked List in PartsMedium
- 729.My Calendar IMedium
- 731.My Calendar IIMedium
- 735.Asteroid CollisionMedium
- 737.Sentence Similarity IIMedium
- 738.Monotone Increasing DigitsMedium
- 739.Daily TemperaturesMedium
- 740.Delete and EarnMedium
- 743.Closest Leaf in a Binary TreeMedium
- 744.Network Delay TimeMedium
- 751.Number Of Corner RectanglesMedium
- 752.IP to CIDRMedium
- 755.Reach a NumberMedium
- 756.Pour WaterMedium
- 757.Pyramid Transition MatrixMedium
- 758.Convert Binary Search Tree to Sorted Doubly Linked ListMedium
- 760.Bold Words in StringMedium
- 764.N-ary Tree Level Order TraversalMedium
- 766.Flatten a Multilevel Doubly Linked ListMedium
- 768.Partition LabelsMedium
- 769.Largest Plus SignMedium
- 772.Construct Quad TreeMedium
- 773.Logical OR of Two Binary Grids Represented as Quad-TreesMedium
- 778.Reorganize StringMedium
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.