【题目】
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 removing the second node from the ...
分类:
其他好文 时间:
2015-05-08 10:59:19
阅读次数:
181
对于awk命令,任何表达式都可以用作数组的下标。所以,也可以用字段作下标。下面的例子中的程序用于计算所有名字在第2 个字段出现的次数,并引入了一种for循环的新形式。
for(index_value in array) statement
在前面介绍的例子中,END块中出现的for循环的工作过程如下:变量name被设为count数组的索引值,在每次for循环的迭代中,执行pri...
分类:
编程语言 时间:
2015-05-08 09:42:33
阅读次数:
159
1 #import "ViewController.h" 2 @interface ViewController () 3 @end 4 @implementation ViewController 5 6 - (void)viewDidLoad { 7 [sup...
分类:
其他好文 时间:
2015-05-07 23:48:42
阅读次数:
128
public class Merge{ //递归分成小部分 public void merge_sort(int[] arrays,int start,int end){ if(start<end){ int m=(start+end)/2; ...
分类:
编程语言 时间:
2015-05-07 23:47:20
阅读次数:
582
UIViewController.m 1 #import "ViewController.h" 2 #import "CustomerSlider.h" 3 @interface ViewController () 4 5 @end 6 7 @implementation ViewControl.....
分类:
其他好文 时间:
2015-05-07 23:45:17
阅读次数:
245
1.在Θ(n)时间内将链表转置,而且只能需要少量的额外空间
这里需要用3个指针使得q指向p然后依次后移。
代码:
#include
using namespace std;
typedef struct Node
{
int data;
struct Node *next;
}LinkList;
LinkList* Create_End();
void printLi...
分类:
编程语言 时间:
2015-05-07 22:10:26
阅读次数:
157
问题1:latex中跨双栏长公式的置顶/置底问题\usepackage{stfloats}长公式的开始和结束加上\begin{figure*}和\end{figure*}。置顶:\begin{figure*}[ht];置底:\begin{figure*}[hb]。把长公式代码放置于它应该出现那页的前...
分类:
其他好文 时间:
2015-05-07 21:40:20
阅读次数:
963
select sum( case when (t.beg_dt'20150401') then t.ac_bal else 0 end ) d1,sum( case when (t.beg_dt'20150402') then t.ac_bal else 0 end ) d2,sum( case ....
分类:
编程语言 时间:
2015-05-07 20:09:51
阅读次数:
147
最近在研究thinkphp框架发现其中有好多东西很值得借鉴今天看了一下函数G()很适合调试出页面执行的时间和使用的内存情况具体的代码如下 * G('begin'); // 记录开始标记位 * // ... 区间运行代码 * G('end'); // 记录结束标签位 * echo G('begin',...
分类:
Web程序 时间:
2015-05-07 18:19:09
阅读次数:
165
iOS7自带侧滑返回功能,但是自定义返回按钮之后,侧滑返回功能会失效,解决办法如下:自定义一个UINavigationController,实现几个代理方法@interfaceCustomNavigationController:UINavigationController
@end#import"CustomNavigationController.h"
@interfaceCustomNavigat..
分类:
移动开发 时间:
2015-05-07 17:06:51
阅读次数:
108