Tony's Log

Algorithms, Distributed System, Machine Learning

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

2015年8月29日

摘要: One pass in-place solution: all swaps.class Solution {public: /** * @param nums: a vector of integers * @return: nothing */ void partit... 阅读全文
posted @ 2015-08-29 14:38 Tonix 阅读(206) 评论(0) 推荐(0)

摘要: A variation to a classical DP: LCS.class Solution {public: /** * @param A an integer array * @return A list of integers includes the index o... 阅读全文
posted @ 2015-08-29 11:43 Tonix 阅读(208) 评论(0) 推荐(0)

摘要: It can be solved based on the code from "Strobogrammatic Number II". The idea is pretty straight forward - binary search the boundaries.class Solution... 阅读全文
posted @ 2015-08-29 06:59 Tonix 阅读(173) 评论(0) 推荐(0)

摘要: This is abouthttps://en.wikipedia.org/wiki/Run-length_encoding. The trick is, for a valid char, we only compress up to 254 occurences - count 255 mean... 阅读全文
posted @ 2015-08-29 01:34 Tonix 阅读(317) 评论(0) 推荐(0)