GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing leetcode.cn — 814. 二叉树剪枝 - 力扣(LeetCode) 题目描述 题目描述 题解 题解 提交记录 提交记录 中等 给你二叉树的根结点 返回移除了所有不包含 节点
示例 1:
输入:root = [1,null,0,0,1] 输出:[1,null,0,null,1] 解释: 只有红色节点满足条件“所有不包含 1 的子树”。 右图为返回的答案。 示例 2:
输入:root = [1,0,1,0,0,0,1] 输出:[1,null,1,null,1] 示例 3:
输入:root = [1,1,0,1,1,0,1,0] 输出:[1,1,0,1,1,null,1]
提示:
代码 代码 测试用例 测试用例 测试结果 测试结果 |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |