Tony's Log

Algorithms, Distributed System, Machine Learning

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

11 2014 档案

摘要:Just reimplemented the solution to this classic problem using Manacher algorithm in my mind. So neat idea :)class Solution {public: string longestP... 阅读全文
posted @ 2014-11-30 08:07 Tonix 阅读(160) 评论(0) 推荐(0)

摘要:目前除了暴力穷举,还没有想出更好的办法。在我的代码里枚举分为两类:在字符间添加同一\两侧之一相同的字符,如向“BC”中添加B或C;在字符间添加与一\两侧均不相同的字符,如向“BC”中添加A。之后,将新字符串按连续字符整理为块,再进行操作模拟。#include #include #include #i... 阅读全文
posted @ 2014-11-27 18:02 Tonix 阅读(1005) 评论(0) 推荐(0)

摘要:Similar with version I, but analysis is different. With the possibility of duplication, only ">" indicate a definite case of next search space.class S... 阅读全文
posted @ 2014-11-15 15:54 Tonix 阅读(127) 评论(0) 推荐(0)

摘要: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... 阅读全文
posted @ 2014-11-15 15:20 Tonix 阅读(155) 评论(0) 推荐(0)

摘要:http://www.zhihu.com/question/26547156Tango Tree Taking advantage of cache locality. 'Preferred path' is a recently access searching path (which is w... 阅读全文
posted @ 2014-11-13 15:50 Tonix 阅读(184) 评论(0) 推荐(0)

摘要: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... 阅读全文
posted @ 2014-11-10 12:24 Tonix 阅读(163) 评论(0) 推荐(0)

摘要:#include #include #include #include #include #include #include using namespace std;void insertSort(int A[], int cnt, int step = 1){ if (cnt 0 && A... 阅读全文
posted @ 2014-11-03 16:07 Tonix 阅读(141) 评论(0) 推荐(0)

摘要: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... 阅读全文
posted @ 2014-11-01 01:11 Tonix 阅读(198) 评论(0) 推荐(0)

摘要:[Rush]a. k-sum generalized-------------------------!1. Greedy vs. DP:http://blog.csdn.net/yelbosh/article/details/7649717. Multiple choices or not:Gr... 阅读全文
posted @ 2014-11-01 01:09 Tonix 阅读(203) 评论(0) 推荐(0)