摘要: https://leetcode.com/problems/reverse-vowels-of-a-string/ Write a function that takes a string as input and reverse only the vowels of a string. Examp 阅读全文
posted @ 2016-12-03 22:29 oO上官麦兜Oo 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 复习一下KMP算法 KMP的主要思想是利用字符串自身的前缀后缀的对称性,来构建next数组,从而实现用接近O(N)的时间复杂度完成字符串的匹配 对于一个字符串str,next[j] = k 表示满足str[0...k-1] = str[j-k...j-1]的最大的k,即对于子串str[0...j-1 阅读全文
posted @ 2016-12-03 19:32 oO上官麦兜Oo 阅读(1784) 评论(0) 推荐(1) 编辑