I don't understand why my code has TLE although it runs very fast on my computer with the same inputs ([77,82,84,80,398,286,40,136,162], 9794):

Could someone please double check this:

```
class Solution(object):
def find(self, coins, amount, d):
if amount in d:
return d[amount]
if amount < 0:
d[amount] = -1
elif amount == 0:
d[amount] = 0
else:
r = 10000
for coin in coins:
result = self.find(coins, amount - coin, d)
if result != -1:
r = min(r, result + 1)
if r == 10000:
d[amount] = -1
else:
d[amount] = r
return d[amount]
def coinChange(self, coins, amount):
return self.find(sorted(coins, reverse=True), amount, {})
```