Big O complexity of NumberOfPathsInMxNMatrix.java
Author: FrantchCreated May 24, 2020Updated Nov 1, 2022
Hello,
I'm trying to figure out the Big O complexity of both of the algorithm writtne in https://github.com/mission-peace/interview/blob/master/src/com/interview/dynamic/NumberOfPathsInMxNMatrix.java
Is it correct to say for countPaths O(countPaths) = n + m + n*m
And what would it be for the recursive approach ?
thank you!
Source: mission-peace/interview