摘要: 题目链接:https://leetcode.com/problems/burst-balloons/ 题意:有n个气球,编号为0-n-1,第i个气球权重为num[i],现在要将这所有的气球烧毁,烧毁第二个气球的代价为num[i-1]*num[i]*num[i+1],且第i个气球烧毁后,第i-1个气球 阅读全文
posted @ 2019-05-28 12:01 dlutjwh 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode.com/problems/shortest-path-visiting-all-nodes/ 题意:已知一条无向图,问经过所有点的最短路径是多长,边权都为1,每个点可能经过多次。 这道题写的时候想简单了,把它当成树的直径来做了,求出一条最长路径len(le 阅读全文
posted @ 2019-05-28 09:05 dlutjwh 阅读(134) 评论(0) 推荐(0) 编辑