Tony's Log

Algorithms, Distributed System, Machine Learning

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

03 2016 档案

摘要:An intuitive DFS one. 阅读全文
posted @ 2016-03-31 00:38 Tonix 阅读(129) 评论(0) 推荐(0)

摘要:Neat DP problem to go. If you don't like log(), you can use lookup table. And, this is an amazing solution: https://leetcode.com/discuss/93501/simple- 阅读全文
posted @ 2016-03-21 12:15 Tonix 阅读(134) 评论(0) 推荐(0)

摘要:Nice one. Try to learn the way of thinking, with the help of the below image: https://leetcode.com/discuss/89336/best-submission-searching-for-the-cro 阅读全文
posted @ 2016-03-13 15:02 Tonix 阅读(166) 评论(0) 推荐(0)

摘要:Recursion of course. But please make sure you cover all the cases. class Solution(object): # return: max value with node picked, max val w\o node pick 阅读全文
posted @ 2016-03-12 14:09 Tonix 阅读(138) 评论(0) 推荐(0)

摘要:Backtrace idea is straightforward. But there are always smarter solutions - like this: https://leetcode.com/discuss/87314/non-recursive-time-space-sol 阅读全文
posted @ 2016-03-12 08:15 Tonix 阅读(135) 评论(0) 推荐(0)

摘要:My first reaction was to use Manacher - which is O(n*k*k) - n is the no. of words, and k is the average length of words. Code of Manacher based soluti 阅读全文
posted @ 2016-03-10 14:57 Tonix 阅读(221) 评论(0) 推荐(0)