Tony's Log

Algorithms, Distributed System, Machine Learning

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

2014年8月21日

摘要: First I thought of a DP solution.. but TLE. So there must be a O(n). I thought of Mono-Queue.. but looks too complex.So what is the naive solution? O(... 阅读全文
posted @ 2014-08-21 13:23 Tonix 阅读(173) 评论(0) 推荐(0)

摘要: 1A! We get median of each array and compare them, then we know which half should be disguarded and how many should be disguarded.class Solution {publi... 阅读全文
posted @ 2014-08-21 12:09 Tonix 阅读(163) 评论(0) 推荐(0)

摘要: A classic and representative DP problem. To be revised later. Quite a few interesting details to think about.class Solution {public: int numDistinc... 阅读全文
posted @ 2014-08-21 11:28 Tonix 阅读(140) 评论(0) 推荐(0)