diff --git a/problems/0102.二叉树的层序遍历.md b/problems/0102.二叉树的层序遍历.md index 0f9b2df6..9b1435a2 100644 --- a/problems/0102.二叉树的层序遍历.md +++ b/problems/0102.二叉树的层序遍历.md @@ -1129,7 +1129,7 @@ var largestValues = function(root) { queue.push(root); while(root!==null&&queue.length){ //设置max初始值就是队列的第一个元素 - let max=queue[0]; + let max=queue[0].val; let length=queue.length; while(length--){ let node = queue.shift();