- 博客(8)
- 收藏
- 关注
原创 KMP实现
代码Version 1/*The length of p(attern) is len, the length of next array is (len+1).*/void preKMP_one(char *p, int *next, int len){ int i = 0, j = -1; next[0] = -1; while (i < len){
2015-09-11 17:00:24
438
原创 Inorder Traversal a BST with Constant Extra Space
1. Modify the BST During the Traversal出自: http://stackoverflow.com/questions/5496464/write-a-non-recursive-traversal-of-a-binary-search-tree-using-constant-space-andUse O(n) time and canstant space.Id
2015-07-31 01:10:41
650
原创 解题思路
3. Longest Substring Without Repeating Characters Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters f
2015-07-18 15:22:09
502
转载 欢迎使用优快云-markdown编辑器
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl
2015-07-18 14:43:49
265
原创 Random Sample - Reservoir
Problem给出一串元素流,设长度为nn,nn可以是未知或是无限的。从中随机抽取ss个样本,要求在任何n=k,k≥sn=k, k \ge s的时刻,kk中任何一个大小为ss的子集被选中的概率都相同。 Randomly select ss items from a set RR of size n>sn > s, where nn is unknown, such that each membe
2015-07-14 11:15:42
402
原创 Ramdon Shuffle
Random ShuffleShuffle SortLinear ShuffleAlgorithmProofA Common MistakeRandom ShuffleGoal. Rearrange array so that result is a uniformly random permutation. (洗牌算法)Shuffle Sort使用排序算法来shuffle:Gener
2015-07-09 16:51:55
787
1
原创 Bioinformatics: Sequencing Antibiotics (week 3-4)
本文为Coursera课程 Assembling Genomes and Sequencing Antibiotics (Bioinformatics II) 笔记。 作者:ybw
2015-07-01 20:15:59
976
原创 Bioinformatics: Assembling Genomes (week 1-2)
Bioinformatics: Assembling Genomes (week 1-2)本文为Coursera课程 Assembling Genomes and Sequencing Antibiotics (Bioinformatics II) 笔记。 作者:ybwBioinformatics Assembling Genomes week 1-2IntroductionMotivatio
2015-06-29 15:25:45
1371
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人