2020年4月26日

1、线性DP 213. 打家劫舍 II

摘要: https://leetcode-cn.com/problems/house-robber-ii/ //rob 0, not rob n-1 || not rob 0,not rob n-1 ==>rob(0,nums.length-2,nums) //not rob 0,rob n-1 || no 阅读全文

posted @ 2020-04-26 10:21 wsw_seu 阅读(133) 评论(0) 推荐(0) 编辑

4. 树形DP

摘要: 337. 打家劫舍 III https://leetcode-cn.com/problems/house-robber-iii/ /** * Definition for a binary tree node. * type TreeNode struct { * Val int * Left *T 阅读全文

posted @ 2020-04-26 10:09 wsw_seu 阅读(95) 评论(0) 推荐(0) 编辑

导航