今天又看了一遍KMP,感觉真的懂了...就来这儿发一下心得吧.KMP算法其实就是暴力的改进版.让我们看看暴力的匹配.Original string: ababababcbbababababcPattern string: abababc步骤:ababababcbbababababcabababc.....
分类:
其他好文 时间:
2014-08-29 14:28:37
阅读次数:
169
题目:
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only cons...
分类:
其他好文 时间:
2014-08-29 13:13:37
阅读次数:
169
求数字的绝对值,vc++提供的库函数的支持,当必须包含:#include
其中又分好几种类型:abs、_abs64、fabs、fabsf、labs、_cabs。详细说明如下:
//Calculate the absolute value.
int abs(
int n
);
long abs(
long n
); // C++ only
double abs...
分类:
其他好文 时间:
2014-08-29 11:01:47
阅读次数:
245
安装好VMwareworkstation后,在物理机的网络连接里面你可以看到多了两块网卡:VMnet1是虚拟机Host-only模式的网络接口VMnet8是虚拟机NAT模式的网络接口1.桥接模式(Bridged)桥接模式:桥接模式下,VMware虚拟出来的操作系统就像是局域网中的一台独立的主机,它可以访问虚拟机..
分类:
其他好文 时间:
2014-08-29 03:00:57
阅读次数:
311
下面以构造一个表单开始,讲解 Thymeleaf的用法。为了演示方便,还是以经典的注册为例。
这是Thymeleaf的form的形式,
action="#"是固定部分,因为action是由th:action指出。@符号是Thymeleaf对URL表达的方式。这是本文的第一个知识点。
URL表达式
首先是绝对路径,
但最常用的...
分类:
编程语言 时间:
2014-08-29 02:54:07
阅读次数:
343
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:
其他好文 时间:
2014-08-28 20:57:46
阅读次数:
201
RGB 与 (RGB转 YCbCr再转为 RGB)的图像 不可逆,可以从 矩阵的逆运算看出来。 附上 matlab 代码:
clc,clear;
Source=imread('1.jpg');%读入原始RGB图像
figure(1);
subplot(1,2,1);
imshow(Source):title('original image');%显示图像
[r c d]=...
分类:
其他好文 时间:
2014-08-28 19:51:25
阅读次数:
292
呵呵,通过:/*ID: qq104801LANG: C++TASK: milk2*/#include #include #include /* for debug only:counter*/void debug_dummy(void){ return;}typedef struct _kk{...
分类:
其他好文 时间:
2014-08-28 18:05:45
阅读次数:
362
目前临时的解决办法是1.把1.选中Targets—>Build Settings—>Architectures。把build active architectures only 改为 NO。2. 把最下面的Valid Architectures中的arm64参数删掉就可以了或者: 双击Archite...
分类:
其他好文 时间:
2014-08-28 17:55:25
阅读次数:
182
Big Event in HDUCrawling in process...
Crawling failed
Time Limit:5000MS
Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Submit
Status
Description
Nowadays, we all know th...
分类:
其他好文 时间:
2014-08-28 16:58:30
阅读次数:
139