Real Interview Questions for the Backend Software Engineer at Stone
NewPractice MCQs
Answers count toward the Backend Software Engineer and overall leaderboards; your latest answer to each question is the one that counts.
MCQ-1A payment service receives `POST /payments` with idempotency key `pay_8841`. The processor charges the card, the response is lost, and the request lock is released. The client retries with the same key, and the processor offers no idempotency support. Which server behaviour prevents a second charge?
Answer to see the discussion.
MCQ-2A backend job must scan `[-2, 1, -3, 4, -1, 2, 1, -5, 4]` once and report the largest sum of any contiguous subarray, using only a few scalar variables. Which result does Kadane's algorithm produce for this input?
Answer to see the discussion.
MCQ-3A backend service checks millions of lowercase usernames (`a`-`z` only) for duplicate characters, with a tight memory budget and a requirement for O(n) time and O(1) extra space. Which data structure best meets both constraints for this input?
Answer to see the discussion.
MCQ-4An API must sustain 60 requests per minute per client while allowing a full minute's worth of requests as a burst after an idle period. After that burst, the client should regain allowance steadily at one request per second, not all at once after a minute. Which limiter configuration meets both requirements?
Answer to see the discussion.
MCQ-5A backend service in Java reverses a singly linked list of 5,000,000 nodes. The recursive version throws `StackOverflowError` before finishing, while the iterative version completes using three local pointers. Which trade-off explains the difference in behaviour for this list?
Answer to see the discussion.
MCQ-6A queue uses `inbox` and `outbox` stacks, transferring all of `inbox` only when `outbox` is empty. It enqueues 100,000 jobs, then dequeues all 100,000 with no interleaving, repeating the batch 10 times. How many stack pushes and pops occur per batch?
Answer to see the discussion.
MCQ-7A URL shortener handles 50,000 redirects per second and 200 writes per second, with 99% of reads hitting 1% of codes. A single Postgres primary saturates on redirect lookups by short code. Which storage design sustains the read load?
Answer to see the discussion.
MCQ-8A notification service must send 6 million messages in a 2-hour peak, including 1.8 million SMS. The SMS provider caps delivery at 300 messages per second per account, while the push gateway allows 2,000 per second. What SMS worker rate delivers all SMS within the window without provider rejections?
Answer to see the discussion.
MCQ-9A chat client queues messages while offline and reconnects after 10 minutes, resending its whole queue. The server assigns a per-conversation sequence number when it first stores each message. What prevents duplicates and preserves order on resend?
Answer to see the discussion.
MCQ-10A ledger must atomically debit one account and credit another, reconcile balances with joins across accounts and entries, and keep an immutable audit trail. Write volume is 2,000 transactions per second and reads are mostly by account. Which storage choice fits these requirements?
Answer to see the discussion.
MCQ-11An `orders` table handles 20,000 writes per second and reads almost exclusively by primary key. It carries eight secondary indexes, several on low-cardinality columns rarely used in queries, and write p99 has risen from 40 ms to 180 ms. Which index change best restores write performance without hurting the main read path?
Answer to see the discussion.
MCQ-12A Postgres service reads an account row, changes its balance in the application, and writes the row back. During peak, two withdrawals both read a balance of 100 and both write 90, losing one update, while the flow calls an external gateway that cannot be safely retried and withdrawals for different accounts must run concurrently. Which locking approach prevents that lost update in this flow?
Answer to see the discussion.
MCQ-13An `orders` service calls `payments` over mTLS in Kubernetes, and `payments` verifies the caller's SPIFFE ID against its trust bundle. A compromised pod in the same namespace holds its own valid SPIFFE ID, can fetch Vault secrets and obtain cluster JWTs for its own identity, and can still call `POST /charge` because that endpoint also accepts a static cluster API key. Which change stops the compromised pod from charging?
Answer to see the discussion.
MCQ-14You chose in-memory sessions on each API instance to avoid extra latency. After deploy, about a third of requests return session-not-found because the managed load balancer round-robins across four instances. The load balancer supports cookie-based sticky sessions, but the p99 budget leaves no room for a cross-region Redis or DynamoDB lookup on every request. What should you do?
Answer to see the discussion.
MCQ-15You are a backend engineer. The product manager and tech lead want a synchronous fraud check on checkout for launch in two weeks, and the check must block the charge before it settles. Your load test shows it pushes p99 past the agreed SLO, the tech lead owns the architecture decision, and the team can run a one-week trial before launch. What is the best way to handle the disagreement?
Answer to see the discussion.
MCQ-16You own a payment ledger migration with a fixed regulatory launch date. The payments team wants the new ledger live that day, while support wants a reporting dashboard added before launch. The dashboard is optional for compliance, and the migration has unresolved load-test failures. What should you do to protect delivery?
Answer to see the discussion.
MCQ-17A junior backend engineer has shipped two PRs that passed CI but missed error-path tests, causing two production incidents this month. The senior wants a mentoring approach that lifts the team's testing standard beyond this one engineer. Which mentoring action best fits that goal?
Answer to see the discussion.
MCQ-18A backend team has 10 days to launch a partner integration, and checkout p99 is 900 ms because the cart endpoint issues an N+1 query. A full ORM refactor would take 3 weeks, while batching that query takes 1 day and brings p99 to 180 ms. What should the team do?
Answer to see the discussion.
Curated: · Written: · Reviewed: