Find the heaviest weighted path