Tony's Log

Algorithms, Distributed System, Machine Learning

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

2014年8月15日

摘要: Here another memory for speed implementation:class Solution {public: bool isValidSudoku(vector > &board) { size_t row_cnt = board.size(); ... 阅读全文
posted @ 2014-08-15 12:20 Tonix 阅读(152) 评论(0) 推荐(0)

摘要: Main reference: http://zhaohongze.com/wordpress/2013/12/10/leetcode-candy/I was confused by the constraint on BOTH sides of an element. Strategy is: s... 阅读全文
posted @ 2014-08-15 10:13 Tonix 阅读(247) 评论(0) 推荐(0)

摘要: http://yucoding.blogspot.com/2012/12/leetcode-question-13-binary-tree.htmlUsually for tree problems, it is either recursion or traversal. For this one... 阅读全文
posted @ 2014-08-15 08:11 Tonix 阅读(114) 评论(0) 推荐(0)

摘要: I got a DP solution first which is O(n^2). Apparently it is not a optimized one - think about: it is linear value space. There must be O(n) solution.A... 阅读全文
posted @ 2014-08-15 04:48 Tonix 阅读(310) 评论(0) 推荐(0)