摘要:
#include using namespace std; void dfs(int num, int * a, bool * isVisited, string temp) { if (temp.size() == num) { cout << temp << endl; } else { for (int i = 1; i <= nu... 阅读全文
posted @ 2017-10-16 19:14
fengzw
阅读(387)
评论(0)
推荐(0)
摘要:
Dijkstra算法用于寻找有权图中的从一个顶点到其他顶点的最短路径(不适用于负权图)。 下面这篇博文给出了介绍Dijkstra算法的比较好的一个例子: http://blog.csdn.net/u013071074/article/details/29582381 下面是代码: 阅读全文
posted @ 2017-10-16 19:12
fengzw
阅读(433)
评论(0)
推荐(0)
摘要:
原题地址: https://leetcode.com/problems/word-break/description/ 题目: Given a non-empty string s and a dictionary wordDict containing a list of non-empty wo 阅读全文
posted @ 2017-10-16 18:43
fengzw
阅读(282)
评论(0)
推荐(0)
摘要:
原题地址: https://leetcode.com/problems/palindrome-partitioning/description/ 题目: Given a string s, partition s such that every substring of the partition 阅读全文
posted @ 2017-10-16 16:36
fengzw
阅读(157)
评论(0)
推荐(0)

浙公网安备 33010602011771号