A recursive algorithm for calculating the longest flow path and its iterative implementation. (September 2020)