BigBasket-Style Machine Coding Round: Format, Tips & Practice Problems
Written and reviewed by Sahil Srivastav
Planned grocery delivery is a capacity-allocation problem with a shopping list attached. Customers pick a delivery slot, each slot has a finite number of orders it can serve per area, and the basket itself contains items whose final quantity is not known until someone weighs them. Machine coding rounds in the style of BigBasket build on both of those, which makes them different from both quick-commerce and general e-commerce rounds.
The other distinctive mechanic is substitution: an out-of-stock item can be replaced by an approved alternative, which changes the order total after checkout. Any design that treats the order total as immutable after payment cannot express it. This page covers the format, the evaluation criteria, and Gronex repositories with the same mechanics.
What a BigBasket-style machine coding round looks like
A representative build is slot booking plus basket fulfilment: expose delivery slots for an area with remaining capacity, let a customer reserve one at checkout, then fulfil the basket item by item with actual quantities, substitutions, and unavailable lines. The statement fixes the rules — capacity per slot per area, a substitution must be from an approved list, a weight-variable item may vary within a stated tolerance.
Slot capacity is a claim-and-release problem with a twist: capacity is per slot and per area, releases happen on cancellation, and the slot must stop being offered the instant it is full. Two customers taking the last slot is the guaranteed probe, and the expected answer is an atomic decrement rather than a read-then-write. The follow-up usually adds a cut-off time after which a slot can no longer be booked — cheap if your slot is an object with a cut-off, expensive if it is a string.
Basket fulfilment then forces a money model where the final amount differs from the authorised amount. The clean shape is an authorised total, a fulfilled total computed from actual quantities and substitutions, and a settlement step that captures or refunds the difference. Reviewers test an item fulfilled short, an item substituted at a higher price with a stated cap, and a line that is entirely unavailable.
How you’re evaluated
Atomic slot capacity
Per-area slot capacity decremented atomically, released on cancellation, and withdrawn from offers when full or past cut-off.
Authorised versus fulfilled money
Two totals and a settlement step, so a short-weighed or substituted basket charges the right amount without a second checkout.
Substitution rules
Approved alternatives only, with the price-increase cap from the statement applied and the substitution recorded on the line.
Line-level fulfilment state
Each basket line fulfilled, short, substituted, or unavailable — with the order status derived from the lines.
Common mistakes that fail this round
- Reading remaining slot capacity and then decrementing it, which over-books the last slot under concurrent checkout.
- Storing the order total as one immutable number, leaving no way to express a short-weighed basket.
- Substituting freely rather than from an approved list, ignoring the cap rule the statement supplies.
- Keeping one status on the order and none on the lines, so a partially fulfilled basket has no representation.
- Forgetting to release slot capacity on cancellation, which silently shrinks tomorrow’s delivery capacity.
Quick tips for the room
- Make slot booking one atomic check-and-decrement, never read-then-write.
- Keep authorised and fulfilled totals as separate fields from the start.
- Put a fulfilment state on every basket line.
- Give the slot a cut-off time so the follow-up costs nothing.
How to prepare
Build the slot as an object with area, window, capacity, booked count, and cut-off, and make booking an atomic check-and-decrement with a release path. Then model the basket line with a fulfilment state and an actual quantity, and write the settlement calculation that compares authorised to fulfilled. Those two pieces are almost the entire rubric.
The repositories below drill them: the shared-calendar problem is capacity-constrained slot claiming, the expiring-holds problem is reservation with timeout and release, the stock reservation problem is the item-level inventory core, the wallet problem is the capture-or-refund settlement step, and the free seat-reservation problem is the claim-and-release baseline.
Practice problems in the BigBasket-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.
Shared Calendar Slot Booking
Capacity-constrained slot claiming under concurrency, with overlap rules and no double-booking.
Open the challenge →Reservation with Expiring Holds
Holds that expire between selection and payment, released exactly once on every exit path.
Open the challenge →Inventory Stock Reservation System
On-hand, reserved, and available kept consistent through orders, cancellations, and receipts.
Open the challenge →Wallet Transaction & Refund System
The settlement step: capture or refund the difference idempotently, with cumulative caps enforced.
Open the challenge →Seat Reservation System
Reserve, cancel, and list availability deterministically — claim-and-release in its simplest form. Free to try.
Open the challenge →FAQ
Are these actual BigBasket interview questions?
No. They are Gronex originals in the style of planned-grocery commerce rounds — the kind of problem asked in rounds like BigBasket’s. Gronex is not affiliated with BigBasket.
Why do slots make this round distinctive?
Because delivery capacity is the scarce resource, not just stock. That means a second claim-and-release system sits alongside inventory, with its own cut-offs and release rules — and the interaction between them is where the interesting questions live.
How should I handle weight-variable items?
Store the ordered quantity and the fulfilled quantity separately, with the tolerance rule from the statement applied at fulfilment. The settlement step then charges for what was actually delivered.
Is quick commerce the same round?
Related but not the same. Quick-commerce rounds centre on dark-store inventory truth and picker dispatch under a ten-minute promise; planned grocery adds slot capacity, substitutions, and a total that changes after checkout.
Related
Gronex is not affiliated with, endorsed by, or sponsored by BigBasket. 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 BigBasket.