主键约束(Primary Key
Constraints):不能在允许NULL值的列上定义主键约束。 ALTER TABLE dbo.test ADD CONSTRAINT PK_test
PRIMARY KEY(testid);唯一约束(Unique Constraints):唯一约束用来保...
分类:
其他好文 时间:
2014-07-22 23:09:33
阅读次数:
347
Single NumberGiven an array of integers, every
element appearstwiceexcept for one. Find that single one.Note:Your algorithm
should have a linear runti...
分类:
其他好文 时间:
2014-07-22 23:07:14
阅读次数:
337
Given two binary trees, write a function to
check if they are equal or not.Two binary trees are considered equal if they are
structurally identical an...
分类:
其他好文 时间:
2014-05-01 16:06:46
阅读次数:
427
2014-04-28
22:05题目:写个程序判断三连棋哪一方赢了。解法:三个相同的棋子连成一条横线,竖线或者对角线就判断为赢了。代码: 1 // 17.2 Write an
algorithm to check if someone has won the tic-tac-toe game. 2 ...
分类:
其他好文 时间:
2014-04-29 18:12:07
阅读次数:
474
2014-04-28 23:35题目:最大子数组和问题。解法:O(n)解法。代码: 1 //
17.8 Find the consecutive subarray with maximum sum in an array. 2 // O(n)
online algorithm. 3 #include...
分类:
其他好文 时间:
2014-04-29 16:35:28
阅读次数:
429