并查集类的c++封装,比较union_find algorithm四种实现方法之间的性能差别...
分类:
编程语言 时间:
2014-05-05 21:25:44
阅读次数:
324
the longest distance of a binary tree
个人信息:就读于燕大本科软件工程专业 目前大三;
本人博客:google搜索“cqs_2012”即可;
个人爱好:酷爱数据结构和算法,希望将来从事算法工作为人民作出自己的贡献;
博客内容:the longest distance of a binary tree;
博客时间:2014-4-...
分类:
其他好文 时间:
2014-05-04 00:28:23
阅读次数:
446
Input
t – the number of numbers in list, then t lines follow [t
Each line contains one integer: N [0 N
Output
Output given numbers in non decreasing order.
Example
Input:
5
5
3
...
分类:
其他好文 时间:
2014-05-04 00:04:09
阅读次数:
376
1 /* 2
============================================================================ 3
Name : sqlist.c 4 Author : codecup 5 Version ...
分类:
其他好文 时间:
2014-05-03 23:54:39
阅读次数:
471
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without an...
分类:
其他好文 时间:
2014-05-03 21:35:49
阅读次数:
310
list1 = [ 4, 7, 7, 3, 3, 3, 2, 1 ]
list2 = [ 5, 4, 3, 3, 2, 2, 2, 1, 1, 1 ]
def havel_hakimi_algo( degree_list ):
degree_list.sort( reverse = True )
print degree_list
for degr...
分类:
编程语言 时间:
2014-05-03 17:13:49
阅读次数:
426
queue for max elem, pop, push
个人信息:就读于燕大本科软件工程专业 目前大三;
本人博客:google搜索“cqs_2012”即可;
个人爱好:酷爱数据结构和算法,希望将来从事算法工作为人民作出自己的贡献;
博客内容:the longest distance of a binary tree;
博客时间:2014-4-15;
编...
分类:
其他好文 时间:
2014-05-03 17:13:09
阅读次数:
406
RDD的依赖关系
Rdd之间的依赖关系通过rdd中的getDependencies来进行表示,
在提交job后,会通过在DAGShuduler.submitStage-->getMissingParentStages
privatedefgetMissingParentStages(stage:
Stage): List[Stage] = {
valmissing
=newHash...
分类:
其他好文 时间:
2014-05-03 15:56:22
阅读次数:
282
只是看看能不能成功使用python操作redis,redis具体的数据结构和使用会在以后学习。安装连接redis的包pipinstallredis本地已经在6379端口启动了redis服务。In[1]:importredis
In[2]:r=redis.StrictRedis(host=‘localhost‘,port=6379,db=0)
In[3]:r.set(‘foo‘,‘bar‘)
Out[3]:Tru..
分类:
编程语言 时间:
2014-05-03 14:38:32
阅读次数:
405