Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.

Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

class Solution: def log_factorial(self, x): ans = 0 for i in range(x): ans += math.log(x-i) return ans def uniquePaths(self, m, n): return int(round( math.exp( self.log_factorial(m+n-2) - self.log_factorial(m-1) - self.log_factorial(n-1) ) ))

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.