Longest Path Matrix | Dynamic Programming | C++ Solution
Longest Path Matrix, is a Dynamic Programming related problem and in this post we will see how we can solve this challenge in C++
given a matrix ,find the longest path in the matrix starting from any cell such that in the path each next element is increasing by a difference of 1 All the elements are distinct we find the path from each cell and return the maximum path TC: O(n^2)
Please check the main.cpp snippet for the solution.
This solution originally posted at: Github by @susantabiswas