Sanjaay Gowda T S
Industrial and Commercial Bank of China Limited practice

ORIGINAL COMPANY-CONTEXT PRACTICE

Prevent duplicate branch appointments after a reschedule

Software engineeringHardConcept

Original practice scenario: A hypothetical banking app lets customers reschedule a branch appointment while staff edit available capacity. Design consistent booking changes under retries.

Written for independent practice using company context; this is not a verified question from a company interview.

A REASONED APPROACH

Model answer.

Treat a reschedule as moving one identified booking between capacity-constrained slots. Cancelling first and creating later can leave the customer without a booking when the new slot fills.

Work through it

  1. Give slots and bookings stable identities and versions, checking eligibility and capacity on the authoritative service rather than relying on a displayed availability cache.
  2. Reserve the new slot and release the old slot within one transaction where possible, or use a recoverable hold workflow with a clear expiration and final outcome.
  3. Bind retries to the intended booking change, returning the stored result and exposing concurrent staff changes as conflicts requiring a fresh choice.

Tradeoffs to discuss

  • Temporary holds improve user experience but reduce visible capacity until expiration; immediate transactions are simpler when both slots share one authority.

Common pitfalls

  • A repeated request must not create several appointments under different booking identifiers.
  • Validate time zones, holidays and daylight-saving boundaries instead of storing only a local clock label.

KEEP PRACTISING

Related questions.

Keep learning beyond the interview.

Explore the Learning Hub