You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:
其他好文 时间:
2014-06-28 10:45:34
阅读次数:
225
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2014-06-26 00:29:49
阅读次数:
168
水题就要水的滴水不漏=-=,第一个疗程博主决定按照SPOJ提交人数的顺序开始刷,主要任务在于熟悉Python. 42. Adding Reversed Numbers 题目非常简单Sample input: 324 14358 754305 794 第一行是下面输入的行数,主要说的事儿是把第一个数反...
分类:
编程语言 时间:
2014-06-25 22:44:11
阅读次数:
250
Range Operators (范围操作符) 在Swift中包含两种范围操作符,它们都是一个数值范围表达式的一种缩写方式.Closed Range Operator (闭区间范围操作符) 闭区间范围操作符(a...b)定义声明了一个从a到b之间的范围,并且包括a和b. 闭区间操作符通常用在迭...
分类:
移动开发 时间:
2014-06-24 14:20:42
阅读次数:
252
import stringimport randomdef get_rand(n): allw = string.letters+string.digits r = [] for i in range(n): r.append(random.choice(allw)) ...
分类:
其他好文 时间:
2014-06-24 13:51:24
阅读次数:
320
昨天在存储过程中用了语句insert into a select from b。在应用中发现bigint字段插入到int字段的时候,数值被截断了,插入后已经不是所要的值。因为存储过程中没有用到异常捕捉的处理,所以一开始并未发现错误,只是在比对数据的时候才发现不对。后来比对了两张表,才发现是字段类型不一样。接下来就试着验证了一下(window下的测试环境)。
创建两张表
CREATE T...
分类:
数据库 时间:
2014-06-22 17:57:28
阅读次数:
356
Description
The cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other names) i...
分类:
其他好文 时间:
2014-06-22 17:15:11
阅读次数:
275
en
conf t
vlan id
end
conf t
inter rang gi 0/0/1-x
switchport access vlan id
no shutdown
exit
(config)#interface range gigabitEthernet 1/0/23-24
(config-if-range)#switchport mode trunk
(con...
分类:
其他好文 时间:
2014-06-22 14:12:59
阅读次数:
421
题目:
Given a binary tree containing digits from 0-9 only, each root-to-leaf
path could represent a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Find...
分类:
其他好文 时间:
2014-06-22 08:30:24
阅读次数:
236
DFS太慢,用SCR好点点
Python 只有 22 行,其实可以更短,但是得排成很长很长的一行
while True:
table = [ [ 0 for j in range( 300 ) ] for i in range( 12 ) ]
table[0][0] = 1
boardsize, chessnum = map( int, raw_input().spli...
分类:
其他好文 时间:
2014-06-22 06:49:10
阅读次数:
239