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.
/**
* Definition for singly-linked...
分类:
其他好文 时间:
2014-10-16 16:28:32
阅读次数:
130
CFileDialog fDlg(true, "jpg", "", OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, "JPG files (*.jpg)|*.jpg|");if (fDlg.DoModal () != IDOK) return;CImage imSrc...
分类:
其他好文 时间:
2014-10-16 15:51:52
阅读次数:
195
String.prototype.replaceCharAt = function(n,c){return this.substr(0, n)+ c + this.substr(n+1,this.length-1-n);}
分类:
编程语言 时间:
2014-10-16 15:18:13
阅读次数:
274
1.自定义函数function getRandom(min,max){ //x上限,y下限 var x = max; var y = min; if(x<y){ x=min; y=max; } var rand = parseInt(Math.random() * (x - y + 1) + y);...
分类:
Web程序 时间:
2014-10-16 14:25:22
阅读次数:
1867
UITextFieldDelegate键盘return事件- (BOOL)textFieldShouldReturn:(UITextField *)textField{ if (textField.tag == 1){ // do next // 光标 ...
分类:
其他好文 时间:
2014-10-16 13:33:42
阅读次数:
164
//将数组保存在文件中
function export_to_file($file, $variable) {
$fopen = fopen($file, 'wb');
if (!$fopen) {
return false;
}
fwrite($fopen, "<?php\nreturn ".var_export($variable, true)....
分类:
编程语言 时间:
2014-10-16 13:15:12
阅读次数:
141
精简的美丽......javascript prototype 对象 函数在javascript中我们都知道创建一个对象使用如下代码var x = {}对象可以拥有属性和方法var x = { value : 0, add : function(a,b){ return a + b; }}而创建一....
分类:
编程语言 时间:
2014-10-16 13:07:12
阅读次数:
142
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are som...
分类:
其他好文 时间:
2014-10-16 09:13:42
阅读次数:
150
#include#include#includeint main(void){ char a[1000]; scanf("%s",a); printf("%s->",a); for(;;) { int len=strlen(a); int i,j,old=atoi(a); for(i=0;ia[j....
分类:
其他好文 时间:
2014-10-16 09:09:32
阅读次数:
151
/** * Return whether the given throwable is a checked exception: * that is, neither a RuntimeException nor an Error. * @param ex the t...
分类:
编程语言 时间:
2014-10-16 06:49:52
阅读次数:
259