Arrays and Number Basics
Some Mastercard screens spend most of the call on Spring and Angular and leave a few minutes for one small coding task. The five problems here fit that slot. They cover number basics and simple array scans. Each has an obvious first version and a faster one the interviewer may ask for next, so get the simple version working before you optimize.
One of the five is longer than the rest and turns on a formatting rule, so confirm the exact format with the interviewer before you write anything.
One problem has come up as a class with fields rather than a single function. Ask how the result should come back before you pick a return type. For every problem, test a zero, a negative number where the input allows one, and equal neighbors. You can run each one in Python, JavaScript, C++, Java, Go or Ruby.
MastercardPremium lesson · Coding round
The 5 Mastercard problems are below.
- A Premium questionCoding · Easy
- A Premium questionCoding · Medium
- A Premium questionCoding · Hard
+ 2 more in this lesson
Each with hints, the follow-up and a tested solution.
Get the Mastercard questions$49 a year · all 100 companies · cancel anytime
From 116 Mastercard reports, forum threads behind logins and write-ups in Chinese.
Mastercard interview guideKnow what Mastercard asks before you walk in.
31 coding · 2 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.