11 2020 档案

摘要:1、399. 除法求值 考点: 1、使用并查集,计算出每个节点到跟节点的除法;如果2个数根节点不一致,则不能相除;如果是相同根节点, 相对除法为 2个数到根节点的相除 2、注意黄色字体的代码,因为返回的xx, yy均为tmp中的数据位置,所有这2行代码顺序不能错; 如果调换,先执行下面语句,则xx, 阅读全文 »
posted @ 2020-11-29 23:09 哈哈哈喽喽喽 阅读(83) 评论(0) 推荐(0) 编辑
摘要:1、面试题 17.10. 主要元素 https://leetcode-cn.com/problems/find-majority-element-lcci/ 考点: class Solution: def majorityElement(self, nums: List[int]) -> int: 阅读全文 »
posted @ 2020-11-21 22:55 哈哈哈喽喽喽 阅读(111) 评论(0) 推荐(0) 编辑
摘要:简单 1、111. 二叉树的最小深度 https://leetcode-cn.com/problems/minimum-depth-of-binary-tree/ 考点: 1、一层一层遍历,直到满足要求 # Definition for a binary tree node. # class Tre 阅读全文 »
posted @ 2020-11-18 11:14 哈哈哈喽喽喽 阅读(95) 评论(0) 推荐(0) 编辑
摘要:1 124. 二叉树中的最大路径和 https://leetcode-cn.com/problems/binary-tree-maximum-path-sum/ 考点: 1、后续遍历,根据左右节点和当前节点的值,判断当前节点最大路径的值 2、一个需要注意点是,左右节点+当前节点作为步骤1之外一个单独 阅读全文 »
posted @ 2020-11-04 23:30 哈哈哈喽喽喽 阅读(73) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示