Can someone please elaborate the editorialist approach. Thanks in advance.
We replace the relationship between the numbers with the directional edge of value. Then we have to solve the shortest path problem of a directed graph. Further observation can be found that the circle of this graph is not necessary. then the graph become a directed acyclic graph, so we can use on dp to solve this problem。
friend if you don’t mind can you please explain it more. I didn’t get it.