题解 | #求路径#4行代码
求路径
http://www.nowcoder.com/practice/166eaff8439d4cd898e3ba933fbc6358
class Solution { public: /** * * @param m int整型 * @param n int整型 * @return int整型 */ int uniquePaths(int m, int n) { // write code her int out; // vector<vector<int>> res; if(m==1||n==1) return 1; out=uniquePaths(m-1,n)+uniquePaths(m,n-1); return out; } };