Tony's Log

Algorithms, Distributed System, Machine Learning

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

2015年9月23日

摘要: Simply a revise of a genius Greedy algorithm seen on LeetCode - linear walking.class Solution {public: /** * @param matrix: A list of lists of ... 阅读全文
posted @ 2015-09-23 05:19 Tonix 阅读(134) 评论(0) 推荐(0)

摘要: Naive solution is O(n^4). But on 1 certain dimension, naive O(n^2) can be O(n) by this well-known equation: sum[i..j] = sum[0..j] - sum[0..i]. And pls... 阅读全文
posted @ 2015-09-23 04:34 Tonix 阅读(231) 评论(0) 推荐(0)