摘要:Just reimplemented the solution to this classic problem using Manacher algorithm in my mind. So neat idea :)class Solution {public: string longestP...
阅读全文
11 2014 档案
摘要:目前除了暴力穷举,还没有想出更好的办法。在我的代码里枚举分为两类:在字符间添加同一\两侧之一相同的字符,如向“BC”中添加B或C;在字符间添加与一\两侧均不相同的字符,如向“BC”中添加A。之后,将新字符串按连续字符整理为块,再进行操作模拟。#include #include #include #i...
阅读全文
摘要:Similar with version I, but analysis is different. With the possibility of duplication, only ">" indicate a definite case of next search space.class S...
阅读全文
摘要:There's usually a common strategy for "find *" problems - binary search: half the space can be dropped by some rules.And take care of corner cases.cla...
阅读全文
摘要:http://www.zhihu.com/question/26547156Tango Tree Taking advantage of cache locality. 'Preferred path' is a recently access searching path (which is w...
阅读全文
摘要:Not very hard to figure out an initial solution, with min heap\monoq\stack. But the key idea is to avoid unnecessary book-keeping when new value is la...
阅读全文
摘要:#include #include #include #include #include #include #include using namespace std;void insertSort(int A[], int cnt, int step = 1){ if (cnt 0 && A...
阅读全文
摘要:1. LC\EPI summary Quick Sort: in C and in Haskell2. G's slides NP-Complete: salesman\knapsack(encrypted) http://blog.csdn.net/liyangbing315/artic...
阅读全文
摘要:[Rush]a. k-sum generalized-------------------------!1. Greedy vs. DP:http://blog.csdn.net/yelbosh/article/details/7649717. Multiple choices or not:Gr...
阅读全文

浙公网安备 33010602011771号