Machine codingTournaments & matchmakingPrize ledgers

MPL-Style Machine Coding Round: Format, Tips & Practice Problems

Written and reviewed by Sahil Srivastav

A mobile gaming platform runs thousands of short tournaments at once, which makes bracket management and matchmaking the core engineering problem rather than an afterthought. Players enter with a fee, are matched by rating into rounds, advance or exit on results, and the prize pool has to be paid out exactly. Machine coding rounds in the style of MPL are built on that tournament machinery.

The interesting mechanics are structural: brackets with byes when the entrant count is not a power of two, progression that must be impossible to skip, and results that arrive from clients that may have disconnected. This page covers the reported format, the evaluation lens, and Gronex repositories that train the same progression and payout mechanics.

What a MPL-style machine coding round looks like

A representative build is a tournament service: register entrants up to a cap with an entry fee, seed a bracket including byes, record match results and advance winners, and distribute the prize pool by final position. Matchmaking variants instead ask for a rating-based pairing service with a widening search window and a queue that must not pair a player with themselves or leave anyone waiting forever.

Bracket construction is where correctness is decided. With thirteen entrants you need three byes placed by seeding rule, and the number of matches in each round must follow from the structure rather than be computed ad hoc. Reviewers check an odd entrant count, a walkover when an opponent does not appear, and an attempt to record a result for a match whose participants have not both been determined — which a well-built bracket rejects naturally.

The money layer is a ledger: entry fees in, platform commission out, prizes distributed by position, and the sum reconciling exactly. Rounds in this style probe a cancelled tournament — every fee refunded, exactly once — and a tie at a paying position. Reconnection handling closes the round: a result submitted twice, by two clients, must produce one recorded outcome and one advancement.

How you’re evaluated

Correct bracket structure

Byes placed by the seeding rule for non-power-of-two fields, with round sizes derived from the structure.

Non-skippable progression

A match is playable only when both participants are determined, and a result advances exactly one entrant exactly once.

Idempotent result submission

The same result submitted twice records once, so reconnecting clients cannot double-advance a player.

Reconciling prize ledger

Fees, commission, prizes, and refunds summing exactly, with cancellation refunding every entrant once.

Common mistakes that fail this round

  • Building the bracket only for powers of two and improvising byes when the count is odd.
  • Allowing a result to be recorded for a match with an undetermined participant, corrupting the tree.
  • Advancing on every received result message, so a reconnect advances a player twice.
  • Computing prizes as percentages with per-winner rounding, leaving the pool unbalanced.
  • Refunding a cancelled tournament without idempotency, paying some entrants twice.

Quick tips for the room

  • Place byes by an explicit rule; never improvise them at runtime.
  • Refuse results for matches with undetermined participants.
  • Make result submission idempotent on a result identifier.
  • Assert that fees minus commission equals prizes plus refunds, exactly.

How to prepare

Build the bracket as an explicit tree with a bye-placement rule, then make recordResult idempotent and guarded on participant determination. Then write the payout as a function whose output sums to the pool, and test the cancellation refund twice. Those four behaviours are what reviewers reach for.

The repositories below map them: the tournament problem is bracket progression itself, the auction problem is competitive ordering with strict acceptance, the escrow problem is fee holding and release, the wallet problem is refunds with caps and idempotency, and the free duplicate-effects problem is the reconnecting-client double-submit.

Practice problems in the MPL-style round format

Each is a real backend repository with a failing test suite — the same working-code standard the round applies. Open the brief and read the full problem, no signup required.

MEDIUM~75 min

Tournament Bracket & Progression

The round itself: seeding, byes, match results, non-skippable advancement, deterministic structure.

Open the challenge →
MEDIUM~120 min

Bid Placement & Closing

Competitive ordering with strict acceptance rules and an unambiguous closing transition.

Open the challenge →
HARD~90 min

Escrow Hold & Release

Entry fees held against an outcome and released exactly once, with reconcilable balances.

Open the challenge →
HARD~90 min

Wallet Transaction & Refund System

Refunds with cumulative caps and idempotent credits — the cancelled-tournament path.

Open the challenge →
HARDFree~90 min

Duplicate Effects After a Restart

The reconnecting-client double-submit, isolated: one effect from at-least-once delivery. Free to try.

Open the challenge →

Rehearse the round before you sit it

Open a real repository, see the failing tests, and make them pass against the clock — the loop a MPL-style machine coding round actually grades. Start free, no card required.

FAQ

Were these problems asked at MPL?

No. They are Gronex originals in the style of tournament-platform rounds — the kind of problem asked in rounds like MPL’s. Gronex is not affiliated with MPL.

Why do byes matter so much?

Because they are the first thing that breaks a bracket built for convenient inputs. Handling thirteen entrants correctly, with byes placed by rule, demonstrates that your structure is real rather than assumed.

How much matchmaking should I implement?

If it is the statement, a rating window that widens over time with a wait-time bound and a deterministic pairing order is enough. The graded part is that nobody waits forever and nobody is paired with themselves.

Is the money side usually required?

Often at least the ledger sketch, because a prize pool that does not reconcile is the most visible possible bug. Even a small entry-fee-to-payout ledger with an asserted total is worth the ten minutes.

Related

Gronex is not affiliated with, endorsed by, or sponsored by MPL. All company names and trademarks belong to their respective owners. The problems on this page are Gronex originals written in the style of such interview rounds — not actual interview questions from MPL.