Minimum Penalty Path Discussions | Algorithms | HackerRank
  • + 1 comment

    Thanks! I undestood the error.

    • + 1 comment

      I am using same approach, but i have answer is 2, for case A ->B -> C Cost (A,B)->1 (B,C) ->2 and (A,B) ->2, but tests cases 5,8, 10 - 13, is wrong answer. Where is error?

      • + 1 comment

        Same for me. Did you find the reason?

        • + 2 comments

          No, I can't find it.

          • + 0 comments

            fionalmatters explained why Djikstra won't work:

            https://www.hackerrank.com/challenges/beautiful-path/forum/comments/137106