Recent | Popular
#c++ #unique_paths #combinatorics
int uniquePaths(int m, int n) { int N = m + n - 2, r = min(m, n)-1; long long p = 1; for(int i = 1 ; i <= r; i++){ p = (p *(N - i + 1))/i; } return p; }
Tue May 30 2023 14:27:01 GMT+0000 (Coordinated Universal Time) https://leetcode.com/problems/unique-paths/