We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16c5337 commit 3941322Copy full SHA for 3941322
Python/domino-and-tromino-tiling.py
@@ -32,7 +32,7 @@ def matrix_mult(A, B):
32
[1, 1, 0, 0], # #(L) = #(|) + #(「)
33
[1, 1, 1, 0]] # #(=) = #(|) + #(「) + #(L)
34
35
- return matrix_expo(T, N)[0][0] # T^N * [1, 0, 0, 0]
+ return matrix_mult([[1, 0, 0, 0]], matrix_expo(T, N))[0][0] # [a0, a(-1), a(-2), a(-3)] * T^N
36
37
38
# Time: O(n)
0 commit comments