message: Update unique-paths.py
diff: -# Time: O(m * n)
  -# Space: O(m + n)
  +# Time: O(m + n)
  +# Space: O(1)
  class Solution(object):
  - # @return an integer
  def uniquePaths(self, m, n):
  + """
  + :type m: int
  + :type n: int
  + :rtype: int
  + """
  + def nCr(n, r): # Time: O(n), Space: O(1)
  + if n-r < r:
  + r = n-r
  + c = 1
  + for k in xrange(1, r+1):
  + c *= n-k+1
  + c //= k
  + return c
  +
  + return nCr((m-1)+(n-1), n-1)
  +
  +
  +# Time: O(m * n)
  +# Space: O(m + n)
  +class Solution2(object):
  + def uniquePaths(self, m, n):
  + """
  + :type m: int
  + :type n: int
  + :rtype: int
  + """
  if m < n:
  - return self.uniquePaths(n, m)
  - ways = [1] * n
  + m, n = n, m
  + dp = [1]*n
  for i in xrange(1, m):
  for j in xrange(1, n):
  - ways[j] += ways[j - 1]
  -
  - return ways[n - 1]
  -
  + dp[j] += dp[j-1]
  + return dp[n-1]
  