好不容易把内容看懂~最主要的一句话:只需要将10k%N的结果与余数信息数组里非空的元素相加,再去模N,看看会不会出现新的余数~时间太紧迫~先把自己写的代码贴上,以后再详解
1 int FindMin(int N) 2 { 3 if(N <= 1) 4 return N; 5 ...
分类:
其他好文 时间:
2014-05-09 10:50:00
阅读次数:
261
Given a linked list, return the node where the
cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it
without using extra space?首先不...
分类:
其他好文 时间:
2014-05-09 10:42:09
阅读次数:
329
http://oj.leetcode.com/problems/edit-distance/class Solution: # @return an
integer def minDistance(self, word1, word2): len1 = len(word1)...
分类:
编程语言 时间:
2014-05-09 04:19:03
阅读次数:
407
function ChkJson(strJson) { //判断Json格式是否正确 if
(strJson == null || strJson == "") return true; try { JSON.parse(strJson); re...
分类:
Web程序 时间:
2014-05-09 03:30:59
阅读次数:
351
Given a triangle, find the minimum path sum
from top to bottom. Each step you may move to adjacent numbers on the row
below.For example, given the fol...
分类:
编程语言 时间:
2014-05-08 18:31:51
阅读次数:
399
错误信息 消息号M7053 解决方法 Step 1、使用MMPV进入“关闭账期”界面。 Step
2、输入“公司代码”、“期间”、“会计年度”后,执行(F8)。 Step 3、使用MMRV进入“查看打开的账期”界面,当前期间仍为“2014/04”。 Step
4、同 Step 1、Step 2 操....
分类:
其他好文 时间:
2014-05-08 18:22:36
阅读次数:
1029
没有输出“false”程序退出了所以不会执行finally但是如果在try中有return但是程序没退出,断电等情况则会执行finally返回false
分类:
编程语言 时间:
2014-05-08 17:00:12
阅读次数:
277
在2^k*2^k个方格组成的棋盘中,有一个方格被占用,用下图的4种L型骨牌覆盖所有棋盘上的其余所有方格,不能重叠。
代码如下:
def chess(tr,tc,pr,pc,size):
global mark
global table
mark+=1
count=mark
if size==1:
return
half=size//2
if pr<t...
分类:
编程语言 时间:
2014-05-08 16:04:51
阅读次数:
367
这道题做的不够顺利,许多次通过,但是居然是卡在一个小问题上了,判断strs是否为空,我想当然地就写成了if(strs
== null) return null;
报错java中null表示还没new出对象,就是还没开辟空间;“”表示new出了对象,但是这个对象装的是空字符串。这里显然是要应对strs...
分类:
其他好文 时间:
2014-05-08 15:16:16
阅读次数:
291
在lua中创建一个Actor对象function Actor.new() local temp
= {} setmetatable(temp, Actor) temp.x = 10 temp.y = 20 return tempendobj =
Actor.new()那么obj.x = 1...
分类:
其他好文 时间:
2014-05-08 15:04:41
阅读次数:
348