Meta Math Coding Interview Questions
81 math coding problems are tagged as asked at Meta in interviews and online assessments reported by candidates. By difficulty they split into 24 basic, 39 intermediate and 18 advanced. The topics they most often combine with are String, Array, Number Theory, Backtracking.
Reported questions change over time and are not a guarantee of what you will be asked, so use the list to see which patterns Meta tends to test. For each problem, practise explaining your approach, its time and space cost and the edge cases before you write the code; every problem opens in an editor that runs your code against test cases.
Coding problems
- Valid Palindrome (Basic)
- Decode Ways (Intermediate)
- Power of Two (Basic)
- Happy Number (Intermediate)
- Count and Say (Intermediate)
- Integer to Roman (Intermediate)
- Power of Three (Basic)
- Count Primes (Intermediate)
- Power of Four (Basic)
- Coin Change Ways (Advanced)
- Target Sum (Advanced)
- Reverse Integer (Intermediate)
- Plus One (Basic)
- Ugly Number (Basic)
- Nim Game (Basic)
- Greatest Common Divisor of Strings (Intermediate)
- Maximum 69 Number (Basic)
- Sum of Subarray Minimums (Advanced)
- Number of Steps to Reduce to Zero (Basic)
- Smallest Even Multiple (Basic)
- Remove K Digits to Get the Smallest Number (Intermediate)
- Count Numbers With Even Digits (Basic)
- Minimum Knight Moves (Intermediate)
- Count Numbers With Unique Digits (Intermediate)
- Coin Change Ways (Intermediate)
- Number of Digit One (Advanced)
- Sum of Subarray Minimums (Advanced)
- Median of Sliding Windows (Intermediate)
- Minimum Number of Perfect Squares (Intermediate)
- Reverse Nodes in Even Length Groups (Intermediate)
- Even Odd Tree (Intermediate)
- Sum of Root-to-Leaf Binary Numbers (Basic)
- Open the Lock (Intermediate)
- Combination Sum IV (Intermediate)
- Knight Dialer (Intermediate)
- Integer Break (Basic)
- Can I Win (Advanced)
- Count Ways to Build Good Strings (Intermediate)
- Valid Number (Advanced)
- String to Integer (Intermediate)
- Integer to English Words (Advanced)
- Decoded String at Index (Advanced)
- Validate IP Address (Intermediate)
- Sum of Subarray Ranges (Intermediate)
- Ugly Number II (Intermediate)
- Super Ugly Number (Intermediate)
- Take Gifts From the Richest Pile (Basic)
- Valid Sudoku (Intermediate)
- Bulls and Cows (Intermediate)
- Bag of Tokens (Intermediate)
- Smallest Divisor Given a Threshold (Intermediate)
- Median of Two Sorted Arrays (Advanced)
- Nth Magical Number (Advanced)
- Ugly Number III (Advanced)
- Total Hamming Distance (Intermediate)
- Divide Two Integers (Intermediate)
- Perfect Number (Basic)
- Self Dividing Numbers (Basic)
- Nth Digit (Intermediate)
- Bulb Switcher (Intermediate)
- Sudoku Solver (Advanced)
- Letter Combinations of a Phone Number (Intermediate)
- Restore IP Addresses (Intermediate)
- Expression Add Operators (Advanced)
- Letter Case Permutation (Basic)
- Additive Number (Intermediate)
- Add to Array-Form of Integer (Basic)
- Second Largest Digit in a String (Basic)
- K Inverse Pairs Array (Advanced)
- Painting a Grid With Three Different Colors (Advanced)
- Divisor Game (Basic)
- Remove Digit to Maximize Result (Basic)
- Strong Password Checker (Advanced)
- Matrix Diagonal Sum (Basic)
- Maximum Running Time of N Computers (Advanced)
- Clumsy Factorial (Intermediate)
- Minimum Moves to Reach Target Score (Intermediate)
- Add Digits (Basic)
- Number of Common Factors (Basic)
- Closest Prime Numbers in Range (Intermediate)
Related
- Meta coding interview questions
- Math problems
- Meta basic problems
- Meta intermediate problems
- Meta advanced problems
- Company interview roadmaps
- All interview guides
Frequently asked questions
How should I use the Meta problem list?
Start with the basic problems, then the intermediate and advanced ones, and note which topics repeat. Solve each under a timer, then read the explanation.
Are these the exact Meta interview questions?
They are problems candidates reported being asked. Companies rotate questions, so use them to learn the patterns, not to predict the exact question.