
算法
dark19940411
Keep moving,keep thinking.
展开
-
Topcoder Arena SRM 144 DIV2 1100 point 图遍历(非递归)+动态规划
Problem Statement You work for an electric company, and the power goes out in a rather large apartment complex with a lot of irate tenants. You isolate the problem to a network of sewers原创 2014-11-30 23:54:40 · 518 阅读 · 0 评论 -
Top Coder Arena SRM 144 DIV 2 550point
Problem Statement Let's say you have a binary string such as the following:011100011One way to encrypt this string is to add to each digit the sum of its adjacent digits. For example, the a原创 2014-11-29 20:58:00 · 641 阅读 · 0 评论 -
最短路径kruskal算法 C++版
#include#include#include#include#includeusing namespace std;#define MAX 1000int father[MAX], son[MAX];int v, l;typedef struct Kruskal //存储边的信息{ int a; int b; int value;};bool cmp(cons转载 2014-06-21 19:08:49 · 752 阅读 · 0 评论 -
记2015年的腾讯校招经历——技术篇
这一篇博客主要是与状态篇形成互补。主要记下一些面试中的题目,并给出题解。 作者注:所有的题目都只给出思考方法,不给出代码。笔试:Q:给出一篇英语文章,并统计里面每个单词的出现次数。A:这题,我用OC给出了一个解法。就是用字典,中的key为单词名,value为单词出现的次数,通篇扫描一次文章,那么字典里就存了每个单词出现的次数。 这是个可行的办法,但是这样子呢,就使用了苹果的库里原创 2015-09-23 17:09:22 · 1264 阅读 · 0 评论