Given two wordsword1andword2, find the minimum
number of steps required to convertword1toword2. (each operation is counted as 1
step.)You have the fol...
分类:
其他好文 时间:
2014-05-10 01:09:28
阅读次数:
325
Given two words word1 and word2, find the
minimum number of steps required to convert word1 to word2. (each operation is
counted as 1 step.)You have t...
分类:
其他好文 时间:
2014-05-09 19:09:35
阅读次数:
318
题目链接食物链类似的题,主要是在于转化,a-b的和为s,转换为b比a-1大s。然后并查集存
此节点到根的差。假如x的根为a,y的根为b:b - y = rank[y]a - x = rank[x]y - x = s可以推出b - a = rank[y]
- rank[x] + s;并查集 延迟更新什...
分类:
其他好文 时间:
2014-05-09 18:38:05
阅读次数:
213
select * from ( select row_number() over(order
by BD008_001) as row ,* from ...
分类:
数据库 时间:
2014-05-09 16:56:57
阅读次数:
328
Oracle的数字类型主要有number,binary_float,binary_double三类,其他的像int,number(p,s)等等大多数都是由这些引申出来的。这部分的理解主要来自oracle11g编程艺术。
其中提到的一个很有意思的东西就是number是软件模拟运算,而binary...
分类:
数据库 时间:
2014-05-09 16:32:13
阅读次数:
350
Problem
1:一个数组中有一个数字a只出现一次,其他数字都出现了两次。请找出这个只出现一次的数字?考察知识点:异或运算思路:比如数字 b^b = 0 a^0 =
a因此,可以将数组中的所有数字进行异或,而最终异或的结果即为所求只出现一次的数字a.代码:1 def SingleNu...
分类:
其他好文 时间:
2014-05-09 12:14:22
阅读次数:
475
Given a linked list, reverse the nodes of a
linked listkat a time and return its modified list.If the number of nodes is not
a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-05-09 12:00:21
阅读次数:
309
我们常常用String的split()方法去分割字符串,有两个地方值得注意:1.
当分隔符是句号时("."),需要转义:由于String.split是基于正则表达式来分割字符串,而句号在正则表达式里表示任意字符。//Wrong://String[]
words = tmp.split(".");//...
分类:
编程语言 时间:
2014-05-08 21:47:41
阅读次数:
444
我们先写一个简单的脚本,执行以后再解释各个变量的意义# touch variable# vi
variable脚本内容如下:#!/bin/shecho "number:$#"echo "scname:$0"echo "first :$1"echo
"second:$2"echo "argume:$@...
分类:
系统相关 时间:
2014-05-08 21:16:46
阅读次数:
480
Unknown argument: -helpGoogle Web Toolkit
1.7.0HostedMode [-noserver] [-port port-number | "auto"] [-whitelist
whitelist-string] [-blacklist blacklist...
分类:
其他好文 时间:
2014-05-08 20:30:02
阅读次数:
303