0 day streak

Mastercard coding interview questions

FintechProduct Global

Ranked by how often candidates report them. Each opens in the editor with hidden tests, an animated walkthrough and solutions in four languages; a question you solve once counts for every company that asks it.

0%ready
Your level: practise every reported question.
ProgressTitleDifficultyTopicHow often hereAlso asked atNext step
Decode StringStack Basics Medium Stack Google, Amazon, Microsoft +31 Solve
Design Linked ListLinked Lists Medium Design Data Structures Electronic Arts, Cisco, Deutsche Bank +11 Solve
Longest Increasing Subsequence1D DP Medium Dynamic Programming Google, Microsoft, TikTok (ByteDance) +29 Solve
Top K Frequent WordsTop K / Kth Largest / Smallest Medium Heaps Google, Amazon, Bloomberg +17 Solve
Integer to English WordsSimulation Hard Arrays & Hashing Meta, Snowflake, Palantir +17 Solve
Linked List CycleSlow Fast Pointers Easy Linked List Microsoft, Apple, Nvidia +67 Solve
Combination Sum (repeating elements)Pick / Not-Pick Medium Recursion & Backtracking Airbnb, Pinterest, Snap +20 Solve
Diameter of Binary TreePostorder + Multiple Return Values Easy Trees & BST Google, Meta, DoorDash +22 Solve
Rotate StringString Basics Easy Arrays & Hashing Zoom, Rivian, ServiceNow +6 Solve
Two SumTwo Sum Easy Arrays & Hashing Google, Amazon, Microsoft +135 Solve
Valid ParenthesesStack Basics Easy Stack Google, Amazon, Microsoft +119 Solve
Best Time to Buy and Sell StockState Machine DP - Stock Problems Easy Dynamic Programming Amazon, Microsoft, Apple +101 Solve
Coin Change IIKnapsack Medium Dynamic Programming Apple, Elastic, UiPath +7 Solve
Strange PrinterInterval DP Hard Dynamic Programming Intuit, InMobi Solve
N-Queens2D Matrix Hard Recursion & Backtracking Netflix, TikTok (ByteDance), Elastic +17 Solve
Coin ChangeKnapsack Medium Dynamic Programming Google, Amazon, Microsoft +55 Solve
Fizz BuzzSimulation Easy Arrays & Hashing Nvidia, Spotify, Wayfair +11 Solve
Gas StationKadane's Algorithm Medium Arrays & Hashing Amazon, Microsoft, Bloomberg +23 Solve
Word Search2D Matrix Backtracking Medium Recursion & Backtracking Google, Microsoft, Meta +36 Solve
Rotate ImageIn-place Transformations Medium Arrays & Hashing Amazon, Apple, Nvidia +38 Solve
Kadane's Algorithm - SimpleKadane's Algorithm Medium Arrays & Hashing Amazon, Microsoft, Apple +79 Solve
Contain VirusMatrix Graphs Hard Graphs Flipkart Solve
Jump GameGreedy Medium Arrays & Hashing Google, Apple, DoorDash +28 Solve
Valid AnagramHashing Easy Arrays & Hashing Netflix, Databricks, Bloomberg +42 Solve
Longest Palindromic SubstringStrings Medium Dynamic Programming Amazon, Microsoft, Apple +68 Solve
Implement Queue using StacksStack Basics Easy Stack Microsoft, Meta, Apple +28 Solve
Rotting OrangesMulti source BFS Medium Graphs Google, Amazon, Microsoft +48 Solve
Validate IP AddressSimulation Medium Arrays & Hashing Meta, Nvidia, X (Twitter) +14 Solve
Valid PalindromeTwo Pointer Easy Arrays & Hashing Microsoft, Meta, Apple +53 Solve
Plus OneRight to Left Traversal Easy Arrays & Hashing Spotify, Oracle, Intuit +5 Solve
String to Integer (atoi)Simulation Medium Arrays & Hashing Amazon, Apple, Netflix +17 Solve
Reverse Linked ListFront Middle Back Pointer Easy Linked List Microsoft, Apple, Bloomberg +81 Solve
Missing NumberMissing / Repeated Numbers Easy Bit Manipulation Microsoft, Nvidia, Palantir +29 Solve
Lowest Common Ancestor of a Binary TreeLCA Medium Trees & BST Google, Amazon, Microsoft +46 Solve
0 - 1 Knapsack ProblemKnapsack Medium Dynamic Programming Coinbase, Goldman Sachs, D. E. Shaw +13 Solve
Count PrimesMath / Number Theory Medium Arrays & Hashing Databricks, Epic Systems, American Express +19 Solve
Middle of the Linked ListSlow Fast Pointers Easy Linked List Apple, Nvidia, X (Twitter) +29 Solve

Questions people ask

What coding questions does Mastercard ask most?

Decode String, Design Linked List, Longest Increasing Subsequence, Top K Frequent Words, Integer to English Words, Linked List Cycle, Combination Sum (repeating elements), Diameter of Binary Tree.

Which topics come up in Mastercard coding rounds?

arrays, strings, dynamic programming, backtracking, graphs, stack.

How hard are Mastercard coding questions?

Of the reported questions, 14 are easy, 19 medium and 4 hard. A 45 to 60 minute live interview where you solve one or two data-structures-and-algorithms problems while explaining your thinking. Interviewers score problem solving, code quality, testing and communication.