freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-82-path-sum-three-w...

1.4 KiB
Raw Blame History

id challengeType videoUrl localeTitle
5900f3be1000cf542c50fed1 5 问题82路径总和三种方式

Description

注意这个问题是问题81的一个更具挑战性的版本。在下面的5乘5矩阵中的最小路径总和从左列中的任何单元格开始并在右列中的任何单元格中完成并且仅向上向下移动右边用红色和粗体表示;总和等于994。

$$ \ begin {pmatrix} 131673\ color {red} {234}\ color {red} {103}\ color {red} {18} \ \ color {red} {201}\ color {红色} {96}\ color {red} {342}965150 \ 630803746422111 \ 537699497121956 \ 80573252437331 \ end {pmatrix} $$

在matrix.txt右键单击和“Save Link / Target As ...”中查找最小路径总和这是一个包含80 x 80矩阵的31K文本文件从左列到右列。

Instructions

Tests

tests:
  - text: <code>euler82()</code>应返回260324。
    testString: assert.strictEqual(euler82(), 260324);

Challenge Seed

function euler82() {
  // Good luck!
  return true;
}

euler82();

Solution

// solution required

/section>