Given a linked list, remove the nth node from
the end of list and return its head.For example,Given linked list:
1->2->3->4->5, and n = 2.After removi...
分类:
其他好文 时间:
2014-05-19 09:16:49
阅读次数:
247
void quickSort(int *a1 , int *a2){ int i=0 ,
j=a2-a1-1; if (i>=j) return; swap(a1[0] , a1[rand()%j+1]); while( ia1[0])
--j; if(i<j)...
分类:
其他好文 时间:
2014-05-19 07:43:47
阅读次数:
213
#include int main(void){ printf("hello
cnblogs!\n"); return 0;}
分类:
其他好文 时间:
2014-05-18 19:50:02
阅读次数:
245
package main import ("fmt")//对象定义type Rect
struct{x,y float64width ,height float64} //对象方法实现func (r *Rect)
Area()float64{return r.width*r.height}//Go语...
分类:
其他好文 时间:
2014-05-18 19:36:55
阅读次数:
405
#include #include #include #include #include
#include int init_win_socket(){ WSADATA wsaData; if(WSAStartup(MAKEWORD(2,2) ,
&wsaData) != 0) { return -...
分类:
其他好文 时间:
2014-05-18 18:57:26
阅读次数:
245
今天看资料时看到这样一段代码,记录下 public static bool operator
==(EntityBase entity1, EntityBase entity2) { if ((object)entity1 == null
&& (o...
分类:
其他好文 时间:
2014-05-18 18:51:59
阅读次数:
209
#includeint solver(const int a[],const int n,const
int t){ int total = 0; if (NULL == a && 0 >= n) return total; int
start = 0; int end = n-1...
分类:
其他好文 时间:
2014-05-18 18:51:03
阅读次数:
175
我们都知道指针是用来操作内存空间的,我们可以简单的拿来改变某个变量的值如:我们定义一个int
a = 5;然后定义一个指针int *p;将change(&a);利用这个调用函数change();用函数int change(int *p){*p =
10;return 1;}输出结果会是:a = 10...
分类:
其他好文 时间:
2014-05-18 02:26:42
阅读次数:
247
Given a linked list, reverse the nodes of a
linked list k at a time and return its modified list.If the number of nodes is
not a multiple of k then le...
分类:
其他好文 时间:
2014-05-18 01:53:53
阅读次数:
331
//扩展方法$.GM.Format = function (source, params) { if
(arguments.length == 1) return function () { var args = $.makeArra...
分类:
Web程序 时间:
2014-05-17 21:49:16
阅读次数:
333