Skip to content

Commit

Permalink
Merge pull request youngyangyang04#2347 from jycoast/master
Browse files Browse the repository at this point in the history
修复337.打家劫舍 III 注释错别字“又孩子”为“右孩子”
  • Loading branch information
youngyangyang04 authored Nov 30, 2023
2 parents c1ee28d + b19af70 commit f30de49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion problems/0337.打家劫舍III.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class Solution {

// 3.状态标记递归
// 执行用时:0 ms , 在所有 Java 提交中击败了 100% 的用户
// 不偷:Max(左孩子不偷,左孩子偷) + Max(又孩子不偷,右孩子偷)
// 不偷:Max(左孩子不偷,左孩子偷) + Max(右孩子不偷,右孩子偷)
// root[0] = Math.max(rob(root.left)[0], rob(root.left)[1]) +
// Math.max(rob(root.right)[0], rob(root.right)[1])
// 偷:左孩子不偷+ 右孩子不偷 + 当前节点偷
Expand Down

0 comments on commit f30de49

Please sign in to comment.