You are viewing a single comment's thread. Return to all comments →
Python Solution that runs on O(n) times only
def solve(c): lyl = [] c.sort(reverse=True) ii = 0 n = len(c) prod = 1 for i in c: if i < n: prod *= (n - i - ii) else: return 0 ii += 1 return prod % 1000000007
Seems like cookies are disabled on this browser, please enable them to open this website
Picking Cards
You are viewing a single comment's thread. Return to all comments →
Python Solution that runs on O(n) times only