解决Linux中文件删除之后,空间没有被释放的问题。
Luby-Karp Algorithm
A polynomial time Monte-Carlo algorithm which produce a good approximation solution to an enumeration problem for which it is known that the computation of the exact solution is very hard.
switch in C++
1 | switch (integer expression) |
其中integer-expression必须为结果为整数值的表达式(如int, char,或者enum枚举量)。switch中的case标签只是行标签,而不是选项之间的界限,如果没有明确的break语句,程序将以此执行之后的所有语句。
Graph Data Sets
sizeof in C++
C++ sizeof 关键字
sizeof 是一个关键字,用于判断变量或数据结构的字节大小,使用语法如下:1
sizeof(datatype)
Definition from msdn
The sizeof keyword gives the amount of storage, in bytes, associated with a variable or a type (including aggregate types). This keyword returns a value of tyoe size_t.
Trie
Trie is an efficient information reTrieval data structre (especially for string), which supports serach, insert and delete operations. Maximum number of children of a node is equal to size of alphabet. Using Trie, search complexities can be brought to optimal limit (key length).
Tree No-recursive Traversal
Data Structure
1 | // Definition for a binary tree node |
KMP
To mathc string in linear time.
Manacher Algorihtm
To calculate the longest palindrome substring.