Jobra
🐞Step 1 of Jobra:AI Debugging Rounds
DSA+AIPreparing you for both.
JOBRA · AI DEBUG ROUND (PREVIEW)sum.cpp
// buggy snippet
int total(vector<int>& a, int n) {
    int sum = 0;
    for (int i = 0; i <= n; i++) { // 🐞        sum += a[i];
    }
    return sum;
}
A real codebase. A real bug. You + AI.

Jobra drops you into a broken repo. Find it, fix it, ship it. AI helps you debug like on the job.

Prompt:Correct the loop condition
Tap 'Let Jobra fix it' below to simulate AI debugging...

How to crack Mastercard: The SDE interview, from real experiences

6 min read

Mastercard SDE interview guide for India campus hiring: the 2-question DSA online assessment, real reported questions, and how lateral hiring differs.

In this article
On this page

Last reviewed November 17, 2026.

For students interviewing for SDE at Mastercard on Indian campuses.

Built by the Codinzhub team from Mastercard SDE online assessment papers that students shared on Codinzhub in October 2026, from IIT Kharagpur. We also searched r/developersIndia (via the keyless Arctic Shift Reddit archive) for "Mastercard interview" and read the results; no campus SDE-specific thread turned up, but we found and read a detailed lateral-hiring thread, which we use only to flag how experienced hiring differs (see "Variations"), not as a source of campus facts. Use this guide as a map, not a promise.

The 30-second version. Mastercard's campus SDE online assessment, reported at IIT Kharagpur in 2026, is 2 DSA coding questions. The reported problems lean toward edit-distance-style string transformation (insert/delete/replace operations) and grid or array construction puzzles with several layered rules. We do not have an interview-stage report for the campus SDE role in this guide; what we have covers the OA only.

Important things to know before the interview

Edit distance (or a close variant) has appeared more than once. Two separate OA records from the same drive describe converting one string into another using insert, delete and replace operations, each costing 1 — the classic edit distance / Levenshtein distance problem. If you prepare only one DP pattern for this role, make it this one.

Expect a multi-rule construction problem, not just a single clean algorithm. The "Mario and the Number Mountain" question layers several rules (pick a center, gather neighbours, sum, sort, then build a mountain by alternating difference and sum) — read the full rule list twice before coding, since a single missed rule breaks the whole output.

We do not have a confirmed interview-round report for the campus SDE role. Everything below the OA is marked clearly as not reported. Confirm with your placement cell what happens after the OA.

What this guide covers

This guide covers the SDE campus role at Mastercard, based on OA question records from IIT Kharagpur (October 2026). It does not cover Data Scientist or Consultant/Associate Product Specialist hiring; see our separate guides for those, linked at the end.

Round-by-round breakdown

Stage 1: Application, where candidates applied

How it works. Not reported. The OA records in this guide are from an on-campus drive at IIT Kharagpur.

Stage 2: Shortlisting, how candidates moved forward

How it works. Not reported.

Stage 3: Online assessment (OA)

How it works. Reports describe 2 DSA coding questions per paper.

At a glance

  • Duration: Not reported
  • Questions per round: 2
  • Topics: string edit distance, 2D grid/matrix construction with layered rules
  • Reported examples: Levenshtein distance, Mario and the Number Mountain

Reported questions

Question summarySkill or patternReported follow-upLevel / scopeCodinzhub question or experience
Minimum insert/delete/replace operations to convert string A into string B (classic edit distance).DP (Levenshtein distance)Not reportedSDE, IIT Kharagpur, 2026Levenshtein Distance
Same edit-distance task, framed as transforming a filename into a dictionary word.DP (Levenshtein distance)Not reportedSDE, IIT Kharagpur, 2026Edit the Filename · Minimum Operations to Convert One String into Another
From the centre of an n×n grid, gather the 8 (or 24, for larger n) neighbours, sum with the centre, sort, then build a "mountain" alternating difference and sum of edge values.Simulation with layered rulesNot reportedSDE, IIT Kharagpur, 2026Mario and the Number Mountain · Construct a Mountain to Reach Princess Peach

Mastercard experiences shared on Codinzhub

No interview-stage experience reports exist yet for the campus SDE role in this guide; only OA question records are available.

The Codinzhub next-round playbook

To prepare for the OA

  • Master the classic edit distance (Levenshtein distance) DP, including reconstructing the operation sequence, not just the minimum count.
  • When a question lists several rules in sequence (like the Number Mountain problem), write each rule down as a numbered step before coding, and test your code against the given example at every step.
  • Practise careful, rule-heavy simulation problems where the main difficulty is correctly implementing the specification, not finding a clever algorithm.

Variations within this role

VariationWhat was reported
Campus vs lateral/experienced hiringA Reddit thread (r/developersIndia) describes a Lead Software Engineer lateral hire in Pune going through a very different process: an HR screening call, a Karat platform interview (system design on a file-handling application, Two Sum, and one DFS problem), then three non-eliminatory rounds with a Bar Raiser, a Hiring Manager and a Technical SME, with compensation discussed only at the very end. This is reported for an experienced lateral role, not the campus SDE drive this guide covers, and should not be assumed to apply to freshers.

Do's and don'ts

DoDon'tWhy it matters
Practise edit distance until you can code it from memory.Treat every string-transformation question as a new problem.Two of the reported OA questions are the same DP pattern under different names.
Write out every rule of a multi-step construction problem before coding.Start coding after skimming the problem once.The Number Mountain question has several chained rules that are easy to misread.
Test your simulation code against the given worked example first.Trust your logic without checking it against the sample.These problems are rule-heavy, so a single misread rule produces a wrong but plausible-looking answer.

Most-asked topics

This dataset is small: 4 OA question records from one campus drive. We list what appeared without ranking by frequency.

TopicWhat it meansReported examplesCodinzhub practice
Edit distance / string DPMinimum operations to transform one string into anotherLevenshtein Distance, Edit the FilenameLevenshtein Distance
Rule-heavy grid constructionBuilding an output by following several chained rules on a gridMario and the Number MountainConstruct a Mountain to Reach Princess Peach

Preparing for the behavioural aspects

Not reported for the campus SDE role. We do not have an interview-stage report to draw advice from.

Practice problems that match the experiences

These are practice analogues, not proof that Mastercard asked the exact problem, unless marked otherwise.

#Practice problemPatternRelated reported question or variant
1Edit Distance (LeetCode)DP (Levenshtein distance)Same underlying problem, reported twice under different names
2Two Sum and basic DFS (standard practice problems)Arrays, hashing, graph traversalReported in the lateral-hire Karat interview, not the campus OA

How to handle a question you have never seen

  1. For a string-transformation question, check if it reduces to edit distance (insert/delete/replace with unit cost); many "convert A into B" questions do.
  2. For a multi-rule construction question, list every rule as a numbered step, then trace through the given example by hand before writing code.
  3. Test edge cases: empty strings, strings that are already equal, and the smallest valid grid size.

Why candidates were rejected

No report in this guide gives an outcome or rejection feedback for the campus SDE role.

If you remember only five things

  1. The campus SDE OA at Mastercard is 2 DSA questions, with edit distance appearing more than once.
  2. Master edit distance (Levenshtein distance) as a DP pattern you can code from memory.
  3. For rule-heavy construction questions, write out every rule before coding.
  4. We have no confirmed interview-round report for the campus SDE role; confirm the format with your placement cell.
  5. Lateral/experienced hiring uses a very different process (Karat interview, Bar Raiser, Hiring Manager rounds) — don't mix that preparation with campus prep.

FAQ

How many OA questions should I expect?

The one reported drive (IIT Kharagpur, 2026) had 2 coding questions per paper.

Is edit distance guaranteed to appear?

Not guaranteed, but it appeared in more than one reported question from the same drive, so it is worth prioritising.

Is the lateral-hire process (Karat, Bar Raiser) relevant to campus hiring?

Not confirmed. The Reddit report describing that process was for an experienced Lead Software Engineer role, not a campus fresher drive.

About this guide

The Codinzhub team wrote this guide from 4 Mastercard SDE OA question records shared on Codinzhub in October 2026, from an IIT Kharagpur campus drive. We also searched r/developersIndia via the keyless Arctic Shift Reddit archive and read the results; no campus-specific SDE thread was found, so no Reddit-sourced facts are used in the OA section above. Questions are short paraphrases in our own words.

You can help other students by sharing your Mastercard experience on Codinzhub.

Interview processes change by campus, year and team. Your placement cell or recruiter can confirm the current format.

Other company and role guides

Ready for the next topic?

Keep track of what you’ve learned.