Tony's Log

Algorithms, Distributed System, Machine Learning

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

2014年8月16日

摘要: O(n^2) is a naive solution. As rule of thumb, there must be O(n) soluion. Yes - Greedy.We assume widest container contains the most water, greedily, b... 阅读全文
posted @ 2014-08-16 14:38 Tonix 阅读(140) 评论(0) 推荐(0)

摘要: -!5. Trie\Suffix Tree:http://blog.csdn.net/v_july_v/article/details/6897097 Trie: think about how you used King Dict by typing; Suffix Tree: all suff... 阅读全文
posted @ 2014-08-16 14:06 Tonix 阅读(214) 评论(0) 推荐(0)

摘要: Simply DFS + Backtrace, as N-Queenclass Solution {public: vector> rows; vector> cols; vector>> subboxHm; bool isValid(char c, int i, int j... 阅读全文
posted @ 2014-08-16 06:34 Tonix 阅读(143) 评论(0) 推荐(0)