added
parent
75f0b66e63
commit
2d86df57a2
|
@ -34,4 +34,8 @@ int main() {
|
|||
int m = matrix[0].size();
|
||||
|
||||
cout<<minSumPath(n,m,matrix);
|
||||
}
|
||||
}
|
||||
// Time Complexity: O(N*M)
|
||||
// Space Complexity: O((M-1)+(N-1)) + O(N*M)
|
||||
// example : N=2,M=3
|
||||
// Min pathsum = 5+9+6+2 =21
|
|
@ -43,4 +43,8 @@ int main() {
|
|||
int n=2;
|
||||
|
||||
cout<<countWays(m,n);
|
||||
}
|
||||
}
|
||||
// Time Complexity: O(M*N)
|
||||
// Space Complexity: O(M*N)
|
||||
// example : M=3,N=2
|
||||
// Unique paths = 3
|
Loading…
Reference in New Issue