Skip to content
Tech Interview Prep

Real Interview Questions for the Software Engineer at Xero

New

Practice MCQs

Answers count toward the Software Engineer and overall leaderboards; your latest answer to each question is the one that counts.

15 questions · Flow follows Relevance until this set has a learning order.

MCQ-1An ASP.NET Core 8 API has `InvoicesController.Create` and a nightly job both calling `InvoiceService.CreateAsync`. The discount threshold is tenant-specific, loaded by the service from tenant settings, and a mismatch must raise `InvoiceTotalMismatchException` for a 409 response. The `Invoice` entity is a plain persistence model with no settings dependency. Where should the total-versus-line-items rule live?
Difficulty: Medium
MCQ-2A C# `PaymentService` creates `new StripeClient(apiKey)` inside its charge method, so unit tests make real network calls. The team must substitute a fake client in tests while keeping existing call sites unchanged. Which injection change achieves that?
Difficulty: Easy
MCQ-3A PR rewrites `RetryAsync` in a payments service with a dense one-line backoff expression and passes the happy-path tests, but adds no test for a timeout during the final retry. The release train leaves in two hours and the author asks for a quick approval. What should the reviewer do?
Difficulty: Medium
MCQ-4A PR raises coverage from 62% to 94%, but its new tests only assert getters and snapshots while the changed payment-retry branch has no test. The PR gate runs unit tests only, the nightly integration suite runs after merge, there is no feature flag, and the change affects both timeout and final-failure paths. What should the reviewer ask for?
Difficulty: Medium
MCQ-5A React 18 timer component initializes `count` to 0 and runs `useEffect(() => { const id = setInterval(() => setCount(count + 1), 1000); return () => clearInterval(id); }, [])`. The component mounts once and no parent re-renders it. What does the displayed count do?
Difficulty: Medium
MCQ-6A billing service calculates tax and discounts with many edge cases, and its end-to-end suite takes 40 minutes and flakes on shared infrastructure. Releases are weekly and defects keep escaping in calculation rules. Where should the team invest next to gain confidence fastest?
Difficulty: Medium
MCQ-7A checkout service handles 2,000 requests per minute. After a gateway timeout, clients retry and 0.4% of orders are charged twice because the database has no deduplication key. Which single change stops duplicate charges without blocking legitimate retries?
Difficulty: Medium
MCQ-8A booking service receives intervals sorted by start, including `[[1,4],[4,7],[6,9],[12,15]]`, where touching intervals must stay separate for back-to-back bookings and nested intervals must be absorbed. Which merge condition produces the required clean set?
Difficulty: Medium
MCQ-9A payments service writes 80,000 events per second across 16 shards partitioned by `tenant_id`. One tenant generates 45% of traffic and its shard saturates while others idle at 20% utilisation. What partitioning change relieves the hot shard?
Difficulty: Medium
MCQ-10A software engineer is drawing the architecture of a payment system they built for Xero interviewers, who include product managers and engineers unfamiliar with the codebase. The system uses a synchronous API, a queue for settlement, and a database, with a trade-off between latency and consistency. What should the drawing and walkthrough emphasise?
Difficulty: Medium
MCQ-11A major international airport assigns gate `G12` to an inbound flight and a departure 25 minutes after its scheduled arrival, but the turnaround needs 40 minutes. An ML model with high confidence predicts the inbound will arrive 50 minutes late, and another gate is free for the departure. What should the scheduling system do?
Difficulty: Medium
MCQ-12A Xero payments team must ship in two days after an audit failed when client-calculated totals were stored and diverged from the ledger, and the remediation assigns the authoritative-total decision to the service owner accountable for it. The tech lead is incident commander on an unrelated outage until after the deadline, and the UI can show a pending total until the server responds in 180 ms. Who should make the binding call?
Difficulty: Easy
MCQ-13A Xero software engineer must pick one project for the next quarter. One helps small business owners get paid faster, the other improves internal deployment tooling with no direct customer impact. Which project best fits Xero's customer focus?
Difficulty: Easy
MCQ-14A candidate tells Xero interviewers they merged a migration that locked the invoices table for 40 minutes at peak, then says they learned to be more careful and have had no incidents since. Team records show the same lock recurred twice in the next year because no timeout or canary was added. What should the interviewer conclude about the candidate's account?
Difficulty: Medium
MCQ-15A C# `PriceOrder` method uses three nested ifs for discount tiers, and `PreviewOrder` copies the same tier logic. Tests pin current totals for every tier, and the team wants to remove duplication before adding a new tier without changing totals. Which refactoring step should they take first?
Difficulty: Easy

Curated: · Written: · Reviewed: