The scenario
Repair a small loan service, then carry balances and ownership rules through funding and repayment. Community reports describe an Amazon AI-assisted debugging round; the repository and financial simulation here are original practice material.
A failure to reason about
A lender may have enough money for one loan but not another. A rejected funding attempt must leave both balances unchanged.
Illustrative context for the topic. The exercise’s full requirements arrive in the workspace.
Questions to bring to your review
- Who may read or modify a loan?
- Which conditions must hold before money changes hands?
- How do remaining debt and cash balance differ?
- Which regression proves a rejected request was atomic?
Skills you will practice
- State transitions
- Atomic validation
- Integer accounting
- Ownership
- Regression testing
Read the existing code, reproduce the reported behavior, review proposed changes, and verify your final implementation. You can use AI assistance while staying responsible for the result.
Prepare with a worked example
- How to review AI-generated code in an interview
Work through a flawed AI patch, design a regression that exposes it, and explain a repair with evidence. A practical code-review exercise for AI-assisted interviews.
See how nrml evaluates an attempt, including the limits of automated evidence.