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.
754 answers
- 720.Longest Word in DictionaryMedium
- 721.Accounts MergeMedium
- 722.Remove CommentsMedium
- 723.Candy CrushMedium
- 724.Find Pivot IndexEasy
- 725.Split Linked List in PartsMedium
- 726.Number of AtomsHard
- 728.Self Dividing NumbersEasy
- 729.My Calendar IMedium
- 731.My Calendar IIMedium
- 732.My Calendar IIIHard
- 733.Flood FillEasy
- 734.Sentence SimilarityEasy
- 735.Asteroid CollisionMedium
- 736.Parse Lisp ExpressionHard
- 737.Sentence Similarity IIMedium
- 738.Monotone Increasing DigitsMedium
- 739.Daily TemperaturesMedium
- 740.Delete and EarnMedium
- 741.Cherry PickupHard
- 742.To Lower CaseEasy
- 743.Closest Leaf in a Binary TreeMedium
- 744.Network Delay TimeMedium
- 745.Find Smallest Letter Greater Than TargetEasy
- 746.Prefix and Suffix SearchHard
- 747.Min Cost Climbing StairsEasy
- 748.Largest Number At Least Twice of OthersEasy
- 749.Shortest Completing WordEasy
- 750.Contain VirusHard
- 751.Number Of Corner RectanglesMedium
- 752.IP to CIDRMedium
- 754.Cracking the SafeHard
- 755.Reach a NumberMedium
- 756.Pour WaterMedium
- 757.Pyramid Transition MatrixMedium
- 758.Convert Binary Search Tree to Sorted Doubly Linked ListMedium
- 759.Set Intersection Size At Least TwoHard
- 760.Bold Words in StringMedium
- 761.Employee Free TimeHard
- 762.Find Anagram MappingsEasy
- 763.Special Binary StringHard
- 764.N-ary Tree Level Order TraversalMedium
- 765.Serialize and Deserialize N-ary TreeHard
- 766.Flatten a Multilevel Doubly Linked ListMedium
- 767.Prime Number of Set Bits in Binary RepresentationEasy
- 768.Partition LabelsMedium
- 769.Largest Plus SignMedium
- 770.Couples Holding HandsHard
- 771.Encode N-ary Tree to Binary TreeHard
- 772.Construct Quad TreeMedium
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.