All problems
Circular Seating Arrangements
Problem
The number of distinct circular arrangements of n distinct people is (n - 1)! because rotations are identified.
Given n >= 1, return the count; return 0 for n = 0.
Hint
Fix one person to break rotational symmetry.
Test cases
case 1
in: [1]
expected: 1
case 2
in: [4]
expected: 6
case 3
in: [5]
expected: 24
Starter codePython
def circular_seating_arrangements(n):
# Your code here
pass3 test cases · run your code against them in the editor