All Challenges

Cinema Seat Booking Selector with Live Total

AngularEasyBookMyShowPaytm InsiderMakeMyTrip
30:00

Problem Brief

Build an interactive seat map with occupied locked seats, tiered row prices, live selected count, and dynamic total amount.

Requirements

  • Clicking available `.seat-btn` toggles selection (`.is-selected`).
  • Occupied seats (`disabled`) cannot be selected.
  • Update `[data-testid="seat-summary"]` with `X seats · ₹TOTAL`.
Progressive Hints (1)
  • Store `data-price` per seat button and compute sum of `.seat-btn.is-selected` nodes on click.
Reference Solution

Stuck? Load the verified reference code into your editor.

Automated Test Suite

2 Test Cases Ready
  • Computes multi-tier total accuratelySelecting A1 (250) + B2 (400) displays 2 seats · ₹650
  • Ignores occupied disabled seatsClicking B1 leaves summary unchanged
solution.html
Live Sandboxed Previewiframe sandbox
Starter template loaded — add your <script> logic in the editor (or open Reference Solution) to make the widget interactive.