Tony's Log

Algorithms, Distributed System, Machine Learning

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

2015年10月7日

摘要: Classic DP. The initial intuitive O(k*n^2) solution is like this: class Solution { public: /** * @param pages: a vector of integers * @param k: an int 阅读全文
posted @ 2015-10-07 15:12 Tonix 阅读(870) 评论(0) 推荐(0)

摘要: Bucketing! A lot of details to take care.struct Bucket{ Bucket() :l(-1), r(-1), bValid(false){};int l, r; bool bValid;};class Solution {public: ... 阅读全文
posted @ 2015-10-07 13:50 Tonix 阅读(177) 评论(0) 推荐(0)

摘要: Binary search. Please not data types and some details.class Solution {public: /** *@param L: Given n pieces of wood with length L[i] *@para... 阅读全文
posted @ 2015-10-07 11:47 Tonix 阅读(229) 评论(0) 推荐(0)