Skip to content

Commit d3da57b

Browse files
committed
Runtime: 65 ms (Top 39.49%) | Memory: 13.8 MB (Top 98.53%)
1 parent a1fdbf6 commit d3da57b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/algorithms/D/Domino and Tromino Tiling/Domino and Tromino Tiling.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Runtime: 65 ms (Top 39.49%) | Memory: 13.8 MB (Top 98.53%)
12
class Solution(object):
23
def numTilings(self, n):
34
"""
@@ -15,7 +16,7 @@ def numTilings(self, n):
1516
iv) f(n) = f(n-1) + f(n-2) + 2*f(n-3) + f(n-1) - f(n-2) - f(n-3)
1617
Simplifying iv in terms of f()
1718
v) f(n) = 2*f(n-1) + f(n-3)
18-
19+
1920
Recurrence Equation from above:
2021
f(n) = 0 when n=0;
2122
= 1 when n=1

0 commit comments

Comments
 (0)