Interview Intel · Mastercard

Mastercard coding interview
questions, leaked.

12 problems reported across recent Mastercard interviews. Top patterns: array, string, dynamic programming. The list below is what most reported candidates actually saw, plus the honest play if you can't grind all of it.

Founder's read

Mastercard's coding assessment leans heavily on array and string manipulation, with 8 of 12 reported problems centered on arrays. Most questions fall in the easy to medium range, but don't let that fool you. The hard problem (Candy) requires solid greedy logic, and problems like Longest Palindromic Substring and Coin Change demand clean dynamic programming. You're looking at a 5 to 7 day sprint to own this list. If you hit a wall on the live assessment, StealthCoder runs invisibly beside you and surfaces a working solution in seconds.

Tracked problems
12
Easy
5/ 42%
Medium
6/ 50%
Hard
1/ 8%

Top problems at Mastercard

leaked_problems.csv12 rows
#ProblemDiffFrequency
01Two SumEASY
100.0
02Valid ParenthesesEASY
94.1
03Best Time to Buy and Sell StockEASY
86.5
04Valid AnagramEASY
86.5
05SubsetsMEDIUM
75.8
06Fizz BuzzEASY
75.8
07Container With Most WaterMEDIUM
75.8
08Rotate ImageMEDIUM
75.8
09Longest Palindromic SubstringMEDIUM
75.8
10CandyHARD
75.8
11Gas StationMEDIUM
75.8
12Coin ChangeMEDIUM
75.8

Frequencies derived from public community-tagged interview reports. Click a row to view on LeetCode.

The hedge

You have a week, maybe less. You can't out-grind the list above. StealthCoder runs invisibly during the actual Mastercard OA. The proctor cannot see it. Screen share cannot detect it. Built because the OA filter rejects engineers who'd pass the on-site. That's a broken filter. This is the workaround.

Get StealthCoder
Topic distribution
What this means

The distribution here is top-heavy on arrays because Mastercard likes problems that test your ability to iterate, partition, and optimize under constraints. Two-pointer techniques (Container With Most Water, Longest Palindromic Substring) and greedy strategies (Gas Station, Candy) appear across multiple problems, so pattern recognition matters. Dynamic programming shows up in 3 problems but mostly in medium difficulty, so you can skip advanced DP until you're confident on the array and string foundations. Start with Two Sum and Valid Anagram to warm up, then move to Container With Most Water and Rotate Image. Candy is the outlier hard problem and uses greedy logic that doesn't generalize much, so treat it as a final stress test. If you haven't drilled greedy or DP patterns before your OA, StealthCoder is your safety net when one lands.

Companies with similar patterns

If you prepped for Mastercard, these companies recycle ~60% of the same topics.

The honest play

You've seen the list. Now make sure you pass Mastercard.

Memorizing every problem above in a week is a fantasy. StealthCoder is the hedge: an AI overlay that's invisible during screen share. It reads the problem on screen and surfaces a working solution in under 2 seconds. Built because the OA filter rejects engineers who'd pass the on-site. That's a broken filter. This is the workaround. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Mastercard interview FAQ

How many array problems should I solve before the Mastercard assessment?+

At least 6 to 8. Arrays dominate the list with 8 of 12 problems. Start with Two Sum, Best Time to Buy and Sell Stock, and Container With Most Water. These three cover hashing, iteration, and two-pointer patterns you'll see again.

Is dynamic programming required for Mastercard's assessment?+

It appears in 3 of 12 problems (Best Time to Buy and Sell Stock, Longest Palindromic Substring, Coin Change), but none are hard except the greedy Candy problem. You can pass by nailing the array and string foundations first, then adding DP solutions once you're comfortable.

Should I learn greedy algorithms before this assessment?+

Yes. Gas Station and Candy both use greedy logic, and Container With Most Water uses a greedy two-pointer approach. That's 3 of 12 problems. Spend a day drilling the greedy pattern on these three, then you're set.

What's the hardest problem Mastercard reportedly asks?+

Candy is the only hard problem reported. It requires a greedy two-pass algorithm that most candidates miss on first attempt. If you have time, drill it last. It's an outlier and won't block you from passing if you nail the mediums.

How should I split my week between topics?+

Day 1-2: array basics (Two Sum, Best Time to Buy and Sell Stock, Rotate Image). Day 3: two-pointer and greedy (Container With Most Water, Gas Station). Day 4: strings and hash tables (Valid Anagram, Valid Parentheses). Day 5-6: dynamic programming and Candy. Day 7: mock run-through of mixed problems.

Problem frequencies sourced from public community-maintained interview-report repos. Problems, ratings, and trademarks are property of LeetCode and Mastercard. StealthCoder is not affiliated with Mastercard.