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
- 897.Prime PalindromeMedium
- 900.Reordered Power of 2Medium
- 905.Length of Longest Fibonacci SubsequenceMedium
- 906.Walking Robot SimulationMedium
- 907.Koko Eating BananasMedium
- 909.Stone GameMedium
- 912.Random Pick with WeightMedium
- 913.Random Flip MatrixMedium
- 914.Random Point in Non-overlapping RectanglesMedium
- 916.Decoded String at IndexMedium
- 921.Spiral Matrix IIIMedium
- 922.Possible BipartitionMedium
- 926.Find and Replace PatternMedium
- 929.Groups of Special-Equivalent StringsMedium
- 930.All Possible Full Binary TreesMedium
- 934.Bitwise ORs of SubarraysMedium
- 936.RLE IteratorMedium
- 940.Fruit Into BasketsMedium
- 943.Sum of Subarray MinimumsMedium
- 945.Snakes and LaddersMedium
- 946.Smallest Range IIMedium
- 947.Online ElectionMedium
- 948.Sort an ArrayMedium
- 951.Partition Array into Disjoint IntervalsMedium
- 952.Word SubsetsMedium
- 955.Complete Binary Tree InserterMedium
- 966.Binary Subarrays With SumMedium
- 967.Minimum Falling Path SumMedium
- 968.Beautiful ArrayMedium
- 971.Shortest BridgeMedium
- 972.Knight DialerMedium
- 974.Reorder Data in Log FilesMedium
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.