摘要: 221: https://leetcode-cn.com/problems/maximal-square/ 1277: https://leetcode-cn.com/problems/count-square-submatrices-with-all-ones/ 今天在攻坚DP问题,刷到这两道十分 阅读全文
posted @ 2020-05-07 18:01 ZJPang 阅读(171) 评论(0) 推荐(0) 编辑
摘要: https://leetcode-cn.com/problems/subtree-of-another-tree/ 我们需要借助一个helper方法,这个思想就是双递归,即判断每个大树的节点和小树的根节点的值是否相等,如果相同就进入子树判断方法。否则就在大树节点的左节点和右节点查找。 helper方 阅读全文
posted @ 2020-05-07 12:24 ZJPang 阅读(158) 评论(0) 推荐(0) 编辑