Minimum Penalty Path Discussions | Algorithms | HackerRank
  • + 6 comments

    He're a dinky sized question that shows the issue nicely.

    8 9

    1 2 1

    1 3 2

    2 4 1

    3 4 2

    4 5 10

    5 6 1

    5 7 2

    6 8 1

    7 8 2

    1 8

    Solution: 10