1.1.1 serviceAction方法
在上个Filter方法中我们会看到如下代码:
this.execute.executeAction(request, response, mapping);
图3.2.1 Filter方法中跳转到action图
而在Execu...
分类:
其他好文 时间:
2014-06-19 10:12:51
阅读次数:
321
LeetCode第一题:Evaluate Reverse Polish Notation...
分类:
其他好文 时间:
2014-06-16 12:51:19
阅读次数:
152
Java作为面向对象的语言,处理结构化的数据当然也可以将其对象化,这就是涉及到了转化工具。而对于XML文件来说,经常使用的是JDK 1.6开始支持的JAXB 2.0,另外还有一款叫做XStream的框架。本人在使用XStream遇到了一些问题,在此分享。...
分类:
移动开发 时间:
2014-06-15 09:53:03
阅读次数:
925
真的被这道题目恶心到了。。。281行代码。。。比一个模拟题还费事。。。
为了方便起见,在数列的前面和后面都加一个0点。
add x :把第k2+2个点旋转至root1.然后sum[root10]+=x;
reverse:把第k1+2个点旋转至root1.然后rev[root10]^=1;
insert x:得到第2个点,然后在第2个点之后插入x。
delete
:把第1个点旋...
分类:
其他好文 时间:
2014-06-14 00:54:26
阅读次数:
324
2 8 5 3 11.从后往前,找到第一个逆序的数
pivot2.从后往前,找到第一个比pivot大的数 change3.交换 pivot 和 change的值4.把pivot这个位置后面的数
reverse,就是 8 5 2 1变成 1 2 5 8最终为3 1 2 5 8#include #inc...
分类:
其他好文 时间:
2014-06-13 17:38:19
阅读次数:
378
Reverse Linked List IIReverse a linked list from
positionmton. Do it in-place and in one-pass.For example:Given
1->2->3->4->5->NULL, m= 2 andn= 4,retu...
分类:
其他好文 时间:
2014-06-12 07:03:54
阅读次数:
308
题目
Reverse a linked list from position m to n. Do it in-place and in one-pass.
For example:
Given 1->2->3->4->5->NULL, m = 2 and n =
4,
return 1->4->3->2->5->NULL.
Note:
Given m,...
分类:
其他好文 时间:
2014-06-11 06:07:11
阅读次数:
392
问题:
给定一个链表的头指针,以及一个整数k,要求将链表按每k个为一组,组内进行链表逆置。少于k个的部分不做处理。
分析:
个人觉得问题的重点是熟悉链表的就地逆置操作,就是头插法。其他的考察点如果还有的话,就的细心程度。
实现:
void reverseList(ListNode *&pre, ListNode *head)
{
ListNode *tail = NULL;
w...
分类:
其他好文 时间:
2014-06-10 17:25:45
阅读次数:
305
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
Clarification:
What constitutes a word?
A sequence of non-space ch...
分类:
其他好文 时间:
2014-06-10 11:12:06
阅读次数:
185