Skip to content

Commit 3941322

Browse files
authored
Update domino-and-tromino-tiling.py
1 parent 16c5337 commit 3941322

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/domino-and-tromino-tiling.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def matrix_mult(A, B):
3232
[1, 1, 0, 0], # #(L) = #(|) + #(「)
3333
[1, 1, 1, 0]] # #(=) = #(|) + #(「) + #(L)
3434

35-
return matrix_expo(T, N)[0][0] # T^N * [1, 0, 0, 0]
35+
return matrix_mult([[1, 0, 0, 0]], matrix_expo(T, N))[0][0] # [a0, a(-1), a(-2), a(-3)] * T^N
3636

3737

3838
# Time: O(n)

0 commit comments

Comments
 (0)