Accepted Answer


  • 5
    R
    select C1.seat_id from cinema C1  where 
    C1.free=1 
    and 
    (
        C1.seat_id+1 in (select seat_id from cinema where free=1) 
        or 
        C1.seat_id-1 in (select seat_id from cinema where free=1) 
    ) 
    order by C1.seat_id
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.