Given a list, rotate the list to the right by k places, where k is non-negative.
For example:
Given 1->2->3->4->5->NULL and k = 2,
return 4->5->1->2->3->NULL.
Solution:
/**
* Definition for ...
分类:
其他好文 时间:
2014-10-12 13:33:18
阅读次数:
161
/** * @param fileName * @return assets中文件的字符串 */ public String getFromAssets(String fileName){ String result=""; ...
分类:
其他好文 时间:
2014-10-12 13:02:57
阅读次数:
163
Subsets II
Total Accepted: 19243 Total
Submissions: 71148My Submissions
Given a collection of integers that might contain duplicates, S, return all possible subsets.
Note:
Elements...
分类:
其他好文 时间:
2014-10-12 11:47:57
阅读次数:
190
456789101112131415161718192021// Return #nodes that matches P or Q in the subtree.int countMatchesPQ(Node *root, Node *p, Node *q) { if (!root) retur....
分类:
其他好文 时间:
2014-10-12 06:40:37
阅读次数:
160
file controller"; exec($cmd,$arr,$return_val); if($return_val==0) $state="success"; ...
分类:
其他好文 时间:
2014-10-12 03:48:42
阅读次数:
127
***根据传入的格式获取日期**@paramformat*如:YYYYMMDD||MM/dd/yyyy,hh:mm:ss*@return字符串的日期*/publicStringgetSysDate(Stringformat){StringdateStr="";try{Formatformatter;Datedate=newDate();formatter=newSimpleDateFormat(format);dateStr=formatter.format(date);}..
分类:
编程语言 时间:
2014-10-12 03:24:08
阅读次数:
305
packageJVM;classSingleton{ publicstaticSingletonsingleton=newSingleton(); publicstaticinta; publicstaticintb=0; privateSingleton(){ super(); a++; b++; } publicstaticSingletongetInstance(){ returnsingleton; }}publicclassTestSingleton{ publicstaticvoidm..
分类:
其他好文 时间:
2014-10-12 03:06:17
阅读次数:
147
封装 字段:存储数据,访问修饰符应该设置为private私有的string _name;属性:保护字段,对字段的取值和赋值进行限定public string Name{ get { return _name; } set { _name = value; }}构造函数:初始化对象,当创建...
分类:
其他好文 时间:
2014-10-12 02:22:57
阅读次数:
121
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.Cl...
分类:
其他好文 时间:
2014-10-12 02:03:07
阅读次数:
213
http://blog.csdn.net/xdweleven/article/details/38319351(1)DES加密函数create or replace functionencrypt_des(p_text varchar2, p_key varchar2) return varchar...
分类:
数据库 时间:
2014-10-12 00:41:06
阅读次数:
540