Skip to content

Commit 4be12d5

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 69dd8c1 commit 4be12d5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

backtracking/seating_arrangements.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
def generate_seating_arrangement(n):
22
"""
33
Generates the nth binary sequence where no two '1's are adjacent.
4-
4+
55
Args:
66
n (int): The position of the sequence to retrieve.
7-
7+
88
Returns:
99
str: The nth valid binary sequence.
10-
10+
1111
Examples:
1212
>>> generate_seating_arrangement(4)
1313
'101'
@@ -40,7 +40,9 @@ def generate_seating_arrangement(n):
4040
a1 += 1
4141
return k1[n]
4242

43+
4344
# Doctest
4445
if __name__ == "__main__":
4546
import doctest
47+
4648
doctest.testmod()

0 commit comments

Comments
 (0)