PhantomCodeAI
Features
Mock Interview
Dashboard
Jobs
Pricing
Resources
Help
Features
Mock Interview
Dashboard
Jobs
Pricing
Resources
Help
PhantomCodeAI
Features
Mock Interview
Dashboard
Jobs
Pricing
Resources
Help
Features
Mock Interview
Dashboard
Jobs
Pricing
Resources
Help
Home
LeetCode Problems
Number Theory
Number Theory
Problems
73 Number Theory LeetCode problems · Solve with AI-powered hints & step-by-step explanations.
204
Count Primes
Medium
258
Add Digits
Easy
858
Mirror Reflection
Medium
866
Prime Palindrome
Medium
914
X of a Kind in a Deck of Cards
Easy
952
Largest Component Size by Common Factor
Hard
1201
Ugly Number III
Medium
1250
Check If It Is a Good Array
Hard
1447
Simplified Fractions
Medium
1492
The kth Factor of n
Medium
1627
Graph Connectivity With Threshold
Hard
1735
Count Ways to Make Array With Product
Hard
1766
Tree of Coprimes
Hard
1799
Maximize Score After N Operations
Hard
1808
Maximize Number of Nice Divisors
Hard
1819
Number of Different Subsequences GCDs
Hard
1952
Three Divisors
Easy
1979
Find Greatest Common Divisor of Array
Easy
1994
The Number of Good Subsets
Hard
1998
GCD Sort of an Array
Hard
2001
Number of Pairs of Interchangeable Rectangles
Medium
2183
Count Array Pairs Divisible by K
Hard
2197
Replace Non-Coprime Numbers in Array
Hard
2280
Minimum Lines to Represent a Line Chart
Medium
2338
Count the Number of Ideal Arrays
Hard
2344
Minimum Deletions to Make Array Divisible
Hard
2413
Smallest Even Multiple
Easy
2427
Number of Common Factors
Easy
2447
Number of Subarrays With GCD Equal to K
Medium
2470
Number of Subarrays With LCM Equal to K
Medium
2507
Smallest Value After Replacing With Sum of Prime Factors
Medium
2513
Minimize the Maximum of Two Arrays
Medium
2521
Distinct Prime Factors of Product of Array
Medium
2523
Closest Prime Numbers in Range
Medium
2543
Check if Point Is Reachable
Hard
2584
Split the Array to Make Coprime Products
Hard
2601
Prime Subtraction Operation
Medium
2607
Make K-Subarray Sums Equal
Medium
2614
Prime In Diagonal
Easy
2654
Minimum Number of Operations to Make All Array Elements Equal to 1
Medium
2709
Greatest Common Divisor Traversal
Hard
2748
Number of Beautiful Pairs
Easy
2761
Prime Pairs With Target Sum
Medium
2807
Insert Greatest Common Divisors in Linked List
Medium
2818
Apply Operations to Maximize Score
Hard
2862
Maximum Element-Sum of a Complete Subset of Indices
Hard
2867
Count Valid Paths in a Tree
Hard
2947
Count Beautiful Substrings I
Medium
2949
Count Beautiful Substrings II
Hard
3012
Minimize Length of Array Using Operations
Medium
3044
Most Frequent Prime
Medium
3115
Maximum Prime Difference
Medium
3116
Kth Smallest Amount With Single Denomination Combination
Hard
3233
Find the Count of Numbers Which Are Not Special
Medium
3260
Find the Largest Palindrome Divisible by K
Hard
3312
Sorted GCD Pair Queries
Hard
3326
Minimum Division Operations to Make Array Non Decreasing
Medium
3334
Find the Maximum Factor Score of Array
Medium
3336
Find the Number of Subsequences With Equal GCD
Hard
3348
Smallest Divisible Digit Product II
Hard
3377
Digit Operations to Make Two Integers Equal
Medium
3378
Count Connected Components in LCM Graph
Hard
3411
Maximum Subarray With Equal Products
Easy
3444
Minimum Increments for Target Multiples in an Array
Hard
3461
Check If Digits Are Equal in String After Operations I
Easy
3463
Check If Digits Are Equal in String After Operations II
Hard
3556
Sum of Largest Prime Substrings
Medium
3569
Maximize Count of Distinct Primes After Split
Hard
3574
Maximize Subarray GCD Score
Hard
3589
Count Prime-Gap Balanced Subarrays
Medium
3591
Check if Any Element Has Prime Frequency
Easy
3605
Minimum Stability Factor of Array
Hard
3618
Split Array by Prime Indices
Medium
← Browse all LeetCode problems