修复错别字“又孩子”为“右孩子”

This commit is contained in:
jycoast
2023-11-28 10:38:26 +08:00
committed by GitHub
parent c1ee28d03f
commit b19af70230

View File

@ -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])
// 偷:左孩子不偷+ 右孩子不偷 + 当前节点偷