Parallel Python实现了一种简易的分布式计算方法。...
分类:
编程语言 时间:
2014-07-08 21:16:43
阅读次数:
227
def Merge(head1, head2):
if head1 == None: return head2
if head2 == None: return head1
psuhead = ListNode(-1)
tail = psuhead
while head1 and head2:
if head1.val < head2.val:
cur = head1
...
分类:
其他好文 时间:
2014-07-08 18:46:04
阅读次数:
227
1.先序遍历非递归算法
#define maxsize 100
typedef struct {
Bitree Elem[maxsize];
int top;
} SqStack;
void PreOrderUnrec(Bitree t) {
SqStack s;
StackInit(s);
p=t;
while (p!=...
分类:
其他好文 时间:
2014-07-08 17:13:18
阅读次数:
267
def reverse(head):
if head == None or head.next == None:
return head
psuhead = ListNode(-1)
while head:
nexthead = head.next
head.next = psuhead.next
psuhead.next = head
head = nexthead
...
分类:
其他好文 时间:
2014-07-08 15:27:58
阅读次数:
183
Radar Installation
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 50740
Accepted: 11394
Description
Assume the coasting is an infinite straight line. Land...
分类:
其他好文 时间:
2014-07-08 15:17:58
阅读次数:
186
腾讯的题目,一条简单的搜索题目,适合初学者练习代码能力,或者是高手休息脑子的题,呵呵,不需要动脑了,只动手打代码就过了。
不过腾讯这故事有点坏啊,给人透露了两个信息:
1 腾讯不拘一格降人才
2 进入腾讯就可以屌丝逆袭了
腾讯是不是还想说腾讯的mm特别多?
呵呵,出题不忘给自己宣传一下。
#include
#include
const int MAX_NM = 20;
i...
分类:
其他好文 时间:
2014-07-08 15:05:26
阅读次数:
171
??
当年徐迟的一篇报告文学,中国人知道了陈景润和歌德巴赫猜想。
那么,什么是歌德巴赫猜想呢?
哥德巴赫是德国一位中学教师,也是一位著名的数学家,生于1690年,1725年当选为俄国彼得堡科学院院士。1742年,哥德巴赫在教学中发现,每个不小于6的偶数都是两个素数(只能被和它本身整除的数)之和。如6=3+3,12=5+7等等。公元1742年6月7日哥德巴赫写信给当时的大数学家...
分类:
其他好文 时间:
2014-07-08 13:57:26
阅读次数:
231
def isOdd(n):
return n & 1
def Reorder(data, cf = isOdd):
odd = 0
even = len( data ) - 1
while True:
while not isOdd( data[ even ]) : even -= 1
while isOdd( data[ odd ]) : odd += 1
if odd ...
分类:
其他好文 时间:
2014-07-08 12:47:26
阅读次数:
276
#include<iostream>
usingnamespacestd;
structnode{
intd;
structnode*next;
};//定义结点
node*build1()//头插法构造单链表
{
node*p;//指向新建结点
node*head;//头指针
head=NULL;
p=head;
intx;
cin>>x;
while(x!=-1)
{
p=newnode;
p->d=x;
p-&g..
分类:
其他好文 时间:
2014-07-08 09:06:06
阅读次数:
220
近日某物大规模挺进,X掉Line之后,又对OneDrive动手了。不幸的而又万幸的是OneDrive(有且只有)网页版被干掉了,而且还只是表面上的,说明某物也不敢对微软动真格,毕竟它(微软)是积极主动配合的。于是我就(作死地)分析一下OneDrive无法正常访问的原因吧!下图:本地路由..
分类:
Web程序 时间:
2014-07-08 08:25:13
阅读次数:
380