How the complexity of solution approach is O(N^3)?Should not it be pseudo exponential?


#1

Comment body goes here.


#2

Time Complexity will be O(m^2) for covering DP. And for every point in (i,j) we are itearting/making 2*(j-i) calls. This can be max 2*m. So, for every point (i,j), there is O(m) itearations. So, total Time Complexity is O(n^3).