Google | Phone screen | Seating arrangements
Anonymous User
2563

A number of X couples go to park. There are 3X seats available. How many different seating arrangements can it be possible? The couples would always sit together. Man takes first seat, woman second and the seating is always in that order.

During that time, interviewer didn't give input and output examples/

for 1 couple -> AX XA / 2 possibilities
for 2 -> ABXX AXBX AXXB XAXB BAXX XABX XXAB BXAX XBAX BXXA XBXA XXBA / 12 possibilities
for 3 -> ABCXXX ABXCXX ABXXCX ABXXXC ACBXXX AXBCXX AXBXCX AXBXXC and so on. 120 possibilities

permutation variant approach but X variable doesn't need to swap itself.

Comments (5)