Help in Hacker Rank question

How to solve this question from hackerrank
link - https://www.hackerrank.com/contests/hack-the-interview-iv/challenges/optimal-path-1

1 Like