10 2018 档案

摘要:"题目 LeetCode 130" 题解: 使用并查集解决 AC代码(c++) 阅读全文
posted @ 2018-10-29 11:04 Shendu.CC 阅读(109) 评论(0) 推荐(0) 编辑
摘要:"题目 LeetCode 129 Root to Leaf Numbers" 水题 阅读全文
posted @ 2018-10-25 20:56 Shendu.CC 阅读(87) 评论(0) 推荐(0) 编辑
摘要:"题目LeetCode 128" 水题一枚 阅读全文
posted @ 2018-10-24 17:21 Shendu.CC 阅读(90) 评论(0) 推荐(0) 编辑
摘要:[题目 LeetCode 127] (https://leetcode.com/problems/word ladder/description/) 题解: BFS struct Node { string word; int dis; Node(){} Node(string word,int d 阅读全文
posted @ 2018-10-24 13:48 Shendu.CC 阅读(143) 评论(0) 推荐(0) 编辑
摘要:"题目 LeetCode 126" 题解: 具体的思路是,分别从起始和结束字符串出发两遍BFS, 得到每个点到起始字符串的最短距离和终点字符串的最短距离。 然后再从起始字符串出发,DFS 寻找路径。由于已经通过BFS得到每个点到两端的最短距离,所以DFS寻找路径可以很大程度的剪枝,从而防止了超时。 阅读全文
posted @ 2018-10-24 13:08 Shendu.CC 阅读(130) 评论(0) 推荐(0) 编辑

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