Compute conditional occupancy across two rooms | Meta Interview Question