Another Double pointer solution. 1A!class Solution {public: ListNode *removeNthFromEnd(ListNode *head, int n) { ListNode *p = NULL; ...
分类:
其他好文 时间:
2014-07-23 14:52:16
阅读次数:
176
题目比较简单。注意看测试用例2,给的提示Please note that this is the largest possible return value: whenever there is a solution, there is a solution that uses at most tw...
分类:
其他好文 时间:
2014-07-23 14:46:06
阅读次数:
283
Variety Merchandise - top directory usually found large bags attract Australia on top of the range solution for blogs and articles about the content o...
分类:
其他好文 时间:
2014-07-23 12:31:06
阅读次数:
296
2 solutions: bin-search and Newton iteration.class Solution {public: int _sqrt(long long tgt, long long i0, long long i1) { long long can...
分类:
其他好文 时间:
2014-07-23 12:02:06
阅读次数:
236
A collegiate textbook problem. Nothing special, but just take care of your memory use.class Solution {public: TreeNode *_buildTree(int pre[], int &...
分类:
其他好文 时间:
2014-07-23 12:00:46
阅读次数:
248
今天重新安装了Linuxmint17Cinnamon系统,进行了以下的操作:一、进行系统的更新sudoapt-getdist-upgrade查看系统信息:uname-alsb_release-asudoreboot二、进行系统的中文配置1、软件源更改主要配置:主要配置:NCHC基础配置:aliyun2、在终端中安装中文语言包sudoapt-getinst..
分类:
其他好文 时间:
2014-07-23 00:18:58
阅读次数:
346
java.lang.ClassCastException: com.chat.upgrade.domain.ClientFile cannot be cast to java.lang.String
今天查一个对象转化成json串报错的问题,查了两个小时,最后问题的根源居然是ibatis。
ibatis的语句如下:
SELECT url
FROM c...
分类:
其他好文 时间:
2014-07-22 23:59:28
阅读次数:
567
public class Solution { public int reverse(int x) { int ret=0; while(x!=0) { int t=x%10; ret=ret*10+t; ...
分类:
其他好文 时间:
2014-07-22 23:25:57
阅读次数:
213
class Solution {public: UndirectedGraphNode *cloneGraph(UndirectedGraphNode *node) { UndirectedGraphNode *clone = dfs(node); dfs_clea...
分类:
其他好文 时间:
2014-07-22 23:05:52
阅读次数:
197
用了一个多小时,根据测试用例如果当前为0,前面必须为1,或者2,并且两者组合成一个dp[i]=dp[i-2];其他情况就简单一些,一定能dp[i-1]和这个单独,可能d[i-2] 1 public class Solution { 2 public boolean isTwo(int a,i...
分类:
其他好文 时间:
2014-07-22 23:04:32
阅读次数:
228