Tony's Log

Algorithms, Distributed System, Machine Learning

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

2014年7月22日

摘要: Really interesting BST manipulation problem!class Solution {public: TreeNode *findConn(TreeNode *p) { TreeNode *pTmp = p; while (p... 阅读全文
posted @ 2014-07-22 13:04 Tonix 阅读(126) 评论(0) 推荐(0)

摘要: Now I believe thoughts leading to DP is brutal DFS.. DFS is brutal force enumeration, but that's too much and naive. We need pruning. So, DFS + Prunin... 阅读全文
posted @ 2014-07-22 12:12 Tonix 阅读(164) 评论(0) 推荐(0)

摘要: For the one pass solution... first I tried to build white\blue from red, but not working anyway. Then I referred someone' code, to build red\blue from... 阅读全文
posted @ 2014-07-22 11:31 Tonix 阅读(133) 评论(0) 推荐(0)

摘要: The first solution I figured out is O(n^3). I thought it must be O(n^2) to get max points on a line for a given point.. but after checking several art... 阅读全文
posted @ 2014-07-22 06:56 Tonix 阅读(147) 评论(0) 推荐(0)