python one-liner


  • 0
    S

    for obvious reason, you may need python or similar language having big integer native support

    class Solution(object):
        def uniquePaths(self, m, n):
            return math.factorial(m+n-2)/(math.factorial(m-1)*math.factorial(n-1))

Log in to reply
 

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