Problems
Callback's own problems and the LeetCode questions companies have been asking, in one place — pick a category, then filter by company, frequency, status, difficulty, topic, and language.
- Number Theory73
- Array1842
- String778
- Hash Table749
- Math565
- Dynamic Programming534
- Sorting483
- Greedy401
- Depth-First Search338
- Binary Search305
- Matrix267
- Breadth-First Search261
Algorithms & Data Structures · Convert through the base unit — and divide with a modular inverse, since you can't divide mod p.
Asked on LeetCode
72 questions tagged Number Theory · all time
- Count PrimesmediumArrayMathEnumerationNumber Theory+310 companies
- Add DigitseasyMathSimulationNumber Theory8 companies
- Closest Prime Numbers in RangemediumMathNumber TheoryPrimality TestSieve Theory+16 companies
- Replace Non-Coprime Numbers in ArrayhardArrayMathStackNumber Theory+25 companies
- Find the Number of Subsequences With Equal GCDhardArrayMathDynamic ProgrammingNumber Theory+25 companies
- Find Triangular Sum of an ArraymediumArrayMathSimulationCombinatorics+14 companies
- The kth Factor of nmediumMathNumber TheoryPrime Factorization4 companies
- Sum of GCD of Formed PairsmediumArrayMathTwo PointersSorting+24 companies
- Minimum Jumps to Reach End via Prime TeleportationmediumArrayHash TableMathBreadth-First Search+14 companies
- Three DivisorseasyMathEnumerationNumber TheoryPrime Factorization+14 companies
- Check If Digits Are Equal in String After Operations IeasyMathStringSimulationCombinatorics+14 companies
- Find Greatest Common Divisor of ArrayeasyArrayMathNumber TheoryEuclidean Algorithm+14 companies
- Prime PalindromemediumMathNumber TheoryPrimality Test4 companies
- Prime Subtraction OperationmediumArrayMathBinary SearchGreedy+14 companies
- Smallest Even MultipleeasyMathNumber Theory4 companies
- Smallest Divisible Digit Product IIhardMathStringBacktrackingGreedy+14 companies
- Insert Greatest Common Divisors in Linked ListmediumLinked ListMathNumber Theory4 companies
- Number of Subarrays With LCM Equal to KmediumArrayMathNumber Theory3 companies
- Check If It Is a Good ArrayhardArrayMathNumber TheoryBézout's Lemma+33 companies
- Minimum Deletions to Make Array DivisiblehardArrayMathSortingHeap (Priority Queue)+33 companies
- Fancy SequencehardMathDesignSegment TreeNumber Theory+13 companies
- GCD of Odd and Even SumseasyMathNumber Theory3 companies
- Sorted GCD Pair QuerieshardArrayHash TableMathBinary Search+63 companies
- Count the Number of Ideal ArrayshardMathDynamic ProgrammingCombinatoricsNumber Theory+23 companies
- Mirror ReflectionmediumMathGeometryNumber TheoryLeast Common Multiple+13 companies
- Count Array Pairs Divisible by KhardArrayHash TableMathCounting+32 companies
- Count Sequences to KhardArrayMathDynamic ProgrammingMemoization+12 companies
- Digit Operations to Make Two Integers EqualmediumMathGraph TheoryHeap (Priority Queue)Number Theory+12 companies
- X of a Kind in a Deck of CardseasyArrayHash TableMathCounting+32 companies
- Largest Component Size by Common FactorhardArrayHash TableMathUnion-Find+22 companies
- Largest Prime from Consecutive Prime SummediumArrayMathNumber Theory2 companies
- Minimum Number of Operations to Make All Array Elements Equal to 1mediumArrayMathNumber TheoryEuclidean Algorithm+12 companies
- Number of Common FactorseasyMathEnumerationNumber TheoryEuclidean Algorithm+12 companies
- Apply Operations to Maximize ScorehardArrayMathStackGreedy+32 companies
- Number of Pairs of Interchangeable RectanglesmediumArrayHash TableMathCounting+12 companies
- Balanced K-Factor DecompositionmediumMathBacktrackingNumber Theory2 companies
- Distinct Prime Factors of Product of ArraymediumArrayHash TableMathNumber Theory+62 companies
- Find the Largest Palindrome Divisible by KhardMathStringDynamic ProgrammingGreedy+12 companies
- Minimum Division Operations to Make Array Non DecreasingmediumArrayMathGreedyNumber Theory2 companies
- Sum of Perfect Square AncestorshardArrayHash TableMathTree+32 companies
- Abbreviating the Product of a RangehardMathNumber Theory1 company
- Number of Self-Divisible PermutationsmediumArrayMathDynamic ProgrammingBacktracking+31 company
- Minimum Number of Primes to Sum to TargetmediumArrayMathDynamic ProgrammingNumber Theory1 company
- Maximum Score with Co-Prime ElementhardArrayHash TableMathCombinatorics+21 company
- Most Expensive Item That Can Not Be BoughtmediumMathDynamic ProgrammingNumber Theory1 company
- Graph Connectivity With ThresholdhardArrayMathUnion-FindNumber Theory1 company
- Maximize Number of Nice DivisorshardMathRecursionNumber Theory1 company
- GCD Sort of an ArrayhardArrayMathUnion-FindSorting+41 company
- Count Beautiful Substrings ImediumHash TableMathStringEnumeration+21 company
- Minimize Array Sum Using Divisible ReplacementsmediumArrayHash TableMathGreedy+11 company
Listings only — titles, difficulty, and tags link out to LeetCode. Imported from the leetcode-company-wise-problems snapshot dated 1 June 2025. Frequency is that dataset's own relative score within a company and time range.