LeetCode Library

LeetCode problems for live interview prep

Search problems by topic and difficulty, then open solver-first pages that show the reasoning, complexity, pitfalls, and GhostInterview workflow in one place.

2,808 problems in the current batchBuilt for scalable pSEO and solver conversion
Focus
Pattern-first interview prep
Filter model
Search, difficulty, and topic
Next layer
Problem page + GhostInterview solver CTA
Browse by pattern
Open full problem breakdowns
Move directly into solver rehearsal
Total Problems2,808
Easy706
Medium1,423
Hard679

Browse by Topic

70 categories available

Showing 50 of 2,808 problems

Problems

Filter by pattern, topic, and difficulty before opening a full solver page.

Open LeetCode solver
#TitleDifficultyTopics
1Two SumFind the pair of indices whose values add up to the target.EasyArray+1 more2Add Two NumbersWork through l1 = [2,4,3], l2 = [5,6,4] and verify why the correct output is [7,0,8].MediumLinked List+2 more3Longest Substring Without Repeating CharactersWork through s = "abcabcbb" and verify why the correct output is 3.MediumHash Table+2 more4Median of Two Sorted ArraysWork through nums1 = [1,3], nums2 = [2] and verify why the correct output is 2.00000.HardArray+2 more5Longest Palindromic SubstringWork through s = "babad" and verify why the correct output is "bab".MediumTwo Pointers+2 more6Zigzag ConversionWork through See original problem statement. and verify why the correct output is See original problem statement..MediumString7Reverse IntegerWork through x = 123 and verify why the correct output is 321.MediumMath8String to Integer (atoi)Work through See original problem statement. and verify why the correct output is See original problem statement..MediumString9Palindrome NumberWork through x = 121 and verify why the correct output is true.EasyMath10Regular Expression MatchingWork through s = "aa", p = "a" and verify why the correct output is false.HardString+2 more11Container With Most WaterWork through height = [1,8,6,2,5,4,8,3,7] and verify why the correct output is 49.MediumArray+2 more12Integer to RomanWork through See original problem statement. and verify why the correct output is See original problem statement..MediumHash Table+2 more13Roman to IntegerWork through See original problem statement. and verify why the correct output is See original problem statement..EasyHash Table+2 more14Longest Common PrefixWork through strs = ["flower","flow","flight"] and verify why the correct output is "fl".EasyArray+2 more153SumWork through nums = [-1,0,1,2,-1,-4] and verify why the correct output is [[-1,-1,2],[-1,0,1]].MediumArray+2 more163Sum ClosestWork through nums = [-1,2,1,-4], target = 1 and verify why the correct output is 2.MediumArray+2 more17Letter Combinations of a Phone NumberWork through digits = "23" and verify why the correct output is ["ad","ae","af","bd","be","bf","cd","ce","cf"].MediumHash Table+2 more184SumWork through nums = [1,0,-1,0,-2,2], target = 0 and verify why the correct output is [[-2,-1,1,2],[-2,0,0,2],[-1,0,0,1]].MediumArray+2 more19Remove Nth Node From End of ListWork through head = [1,2,3,4,5], n = 2 and verify why the correct output is [1,2,3,5].MediumLinked List+1 more20Valid ParenthesesCheck whether a bracket string is balanced and properly nested.EasyStack+1 more21Merge Two Sorted ListsWork through list1 = [1,2,4], list2 = [1,3,4] and verify why the correct output is [1,1,2,3,4,4].EasyLinked List+1 more22Generate ParenthesesWork through n = 3 and verify why the correct output is ["((()))","(()())","(())()","()(())","()()()"].MediumString+2 more23Merge k Sorted ListsWork through lists = [[1,4,5],[1,3,4],[2,6]] and verify why the correct output is [1,1,2,3,4,4,5,6].HardLinked List+3 more24Swap Nodes in PairsWork through head = [1,2,3,4] and verify why the correct output is [2,1,4,3].MediumLinked List+1 more25Reverse Nodes in k-GroupWork through head = [1,2,3,4,5], k = 2 and verify why the correct output is [2,1,4,3,5].HardLinked List+1 more26Remove Duplicates from Sorted ArrayWork through See original problem statement. and verify why the correct output is See original problem statement..EasyArray+1 more27Remove ElementWork through See original problem statement. and verify why the correct output is See original problem statement..EasyArray+1 more28Find the Index of the First Occurrence in a StringWork through haystack = "sadbutsad", needle = "sad" and verify why the correct output is 0.EasyTwo Pointers+2 more29Divide Two IntegersWork through dividend = 10, divisor = 3 and verify why the correct output is 3.MediumMath+1 more30Substring with Concatenation of All WordsWork through s = "barfoothefoobarman", words = ["foo","bar"] and verify why the correct output is [0,9].HardHash Table+2 more31Next PermutationWork through nums = [1,2,3] and verify why the correct output is [1,3,2].MediumArray+1 more32Longest Valid ParenthesesWork through s = "(()" and verify why the correct output is 2.HardString+2 more33Search in Rotated Sorted ArrayWork through nums = [4,5,6,7,0,1,2], target = 0 and verify why the correct output is 4.MediumArray+1 more34Find First and Last Position of Element in Sorted ArrayWork through nums = [5,7,7,8,8,10], target = 8 and verify why the correct output is [3,4].MediumArray+1 more35Search Insert PositionWork through nums = [1,3,5,6], target = 5 and verify why the correct output is 2.EasyArray+1 more36Valid SudokuWork through board = [["5","3",".",".","7",".",".",".","."] ,["6",".",".","1","9","5" and verify why the correct output is true.MediumArray+2 more37Sudoku SolverWork through board = [["5","3",".",".","7",".",".",".","."],["6",".",".","1","9","5", and verify why the correct output is [["5","3","4","6","7","8","9","1","2"],["6","7",.HardArray+3 more38Count and SayWork through See original problem statement. and verify why the correct output is See original problem statement..MediumString39Combination SumWork through candidates = [2,3,6,7], target = 7 and verify why the correct output is [[2,2,3],[7]].MediumArray+1 more40Combination Sum IIWork through candidates = [10,1,2,7,6,1,5], target = 8 and verify why the correct output is [ [1,1,6], [1,2,5], [1,7], [2,6] ].MediumArray+1 more41First Missing PositiveWork through nums = [1,2,0] and verify why the correct output is 3.HardArray+1 more42Trapping Rain WaterWork through height = [0,1,0,2,1,0,1,3,2,1,2,1] and verify why the correct output is 6.HardArray+4 more43Multiply StringsWork through num1 = "2", num2 = "3" and verify why the correct output is "6".MediumMath+2 more44Wildcard MatchingWork through s = "aa", p = "a" and verify why the correct output is false.HardString+3 more45Jump Game IIWork through nums = [2,3,1,1,4] and verify why the correct output is 2.MediumArray+2 more46PermutationsWork through nums = [1,2,3] and verify why the correct output is [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1].MediumArray+1 more47Permutations IIWork through nums = [1,1,2] and verify why the correct output is [[1,1,2], [1,2,1], [2,1,1]].MediumArray+2 more48Rotate ImageWork through matrix = [[1,2,3],[4,5,6],[7,8,9]] and verify why the correct output is [[7,4,1],[8,5,2],[9,6,3]].MediumArray+2 more49Group AnagramsWork through strs = ["eat","tea","tan","ate","nat","bat"] and verify why the correct output is [["bat"],["nat","tan"],["ate","eat","tea"]].MediumArray+3 more50Pow(x, n)Work through x = 2.00000, n = 10 and verify why the correct output is 1024.00000.MediumMath+1 more

GhostInterview's LeetCode problems hub is built for one job: help you move from “I know this topic exists” to “I can explain and solve it cleanly in an interview.” Use the search box when you know the problem name, use the topic browser when you want to practice a pattern, and use the difficulty filter when you want to control how much friction you take on in one study block.

How To Use This Hub

Treat this page like a prep router rather than a static index. The quickest workflow is to filter down to a topic, open one problem page, read the answer-first summary, and then use GhostInterview to rehearse how you would explain the same logic under time pressure. That is more useful than passively browsing a long list of questions with no execution plan.

Search by the pattern you want to improve

If your weak spot is graph traversal, topological sort, or pointer-heavy debugging, start with the topic browser instead of scrolling. The goal is to build repetition around one reasoning pattern rather than bouncing between unrelated questions.

Filter difficulty to control the session

Difficulty filters matter because interview practice breaks down when the session is too wide. Easy problems are good for speed and explanation polish. Medium problems are where most interview signal lives. Hard problems are useful once the communication flow is stable and you want to stress-test decision making.

What Makes These Problem Pages Different

Raw problem directories are useful for cataloging. They are less useful for live interview performance. GhostInterview problem pages are written around execution: what the question is really asking, which pattern usually unlocks it, how to explain the trade-offs, where candidates get stuck, and how the solver can support you in a real round.

Every page starts with the answer-first takeaway

The first sentences tell you what the problem reduces to and which pattern normally wins. That gives you a fast checkpoint before you commit to reading the full breakdown.

The structure stays stable across pages

Every problem page uses the same core sections: problem statement, examples, constraints, solution approach, complexity analysis, pitfalls or variants, and a GhostInterview workflow block. That consistency matters once you start producing this cluster at scale because it gives the later hybrid pipeline a clean contract to fill.

How GhostInterview Fits Into Problem Practice

Use the problem page as the static prep artifact and use GhostInterview as the live rehearsal layer. Read the breakdown, restate the approach in your own words, and then simulate a follow-up conversation with the product. This works especially well when you pair the problem page with the LeetCode interview copilot, the broader coding interview assistant, and the product workflow guide on how GhostInterview works.

Practice the explanation, not just the code

A correct implementation is not the same thing as strong interview signal. Most missed opportunities happen in framing, trade-off narration, and follow-up handling. Use the page to anchor the algorithm, then use the solver to rehearse how you would talk through it under pressure.

Keep sessions narrow and repeatable

A good prep block usually focuses on one or two topics and a small number of problems. When you can explain two medium questions in the same family without restarting your reasoning from scratch, you are building something that transfers into live interviews.

Why This Framework Works For Batch Production

This hub is also the foundation for a mixed generation workflow. Deterministic facts such as problem number, difficulty, topics, examples, and constraints can come from scripts. The higher-value writing blocks can come from a structured LLM task with fixed context. That lets GhostInterview publish pages that feel specific and useful without forcing each subagent to rediscover the same baseline facts every time.

FAQ

What is this LeetCode problems hub for?

It is a filterable library of GhostInterview problem pages. Use it to find the right problem, review the pattern, and open a solver-focused breakdown before a live interview.

How are the problem pages different from raw LeetCode listings?

Each page is written for interview execution. The focus is on a clean problem statement, the reasoning path, complexity, pitfalls, and how GhostInterview can help you stay organized under pressure.

Can I filter by difficulty and topic?

Yes. The hub supports search plus difficulty and topic filters so you can narrow the list quickly before opening a specific page.

Does the hub replace the LeetCode interview copilot page?

No. The hub is the discovery layer. The commercial page still explains the GhostInterview solver workflow, while each problem page connects that workflow to one interview question.

Will more problems be added later?

Yes. This hub is designed for controlled batch rollout, so the library can grow without changing the page structure or route model.

Need a solver while you practice?

Use the GhostInterview LeetCode solver for real-time reasoning, complexity checks, and follow-up handling during coding interview rehearsal.