🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Design a Ticket Booking System: all 10 questions

Quiz: Design a Ticket Booking System · Question 1 of 10

What causes double booking in "check, then act" code?

What causes double booking in "check, then act" code?

  1. A.Too many seats in the database
  2. B.Two requests both read "free" before either writes "booked" — a race condition
  3. C.Using SQL instead of NoSQL
  4. D.A slow payment gateway
Answer & explanation

Correct answer: Two requests both read "free" before either writes "booked" — a race condition

The check and the change are separate steps, so another request can slip between them.

Can you get the rest right without peeking?

Take the timed Quiz: Design a Ticket Booking System quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →