Skip to content

Commit 48709ca

Browse files
committed
Runtime: 164 ms (Top 43.73%) | Memory: 14 MB (Top 84.10%)
1 parent 1fb93a6 commit 48709ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/algorithms/S/Shopping Offers/Shopping Offers.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Runtime: 164 ms (Top 43.73%) | Memory: 14 MB (Top 84.10%)
12
class Solution:
23
def shoppingOffers(self, price: List[int], special: List[List[int]], needs: List[int]) -> int:
34
def dfs(price, special, needs, memo = {}):
@@ -21,4 +22,4 @@ def dfs(price, special, needs, memo = {}):
2122
res.append(dfs(price, special, new_needs, memo) + offer[-1])
2223
memo[tuple(needs)] = min(res)
2324
return min(res)
24-
return dfs(price, special, needs)
25+
return dfs(price, special, needs)

0 commit comments

Comments
 (0)