Tony's Log

Algorithms, Distributed System, Machine Learning

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

07 2016 档案

摘要:A simple math on modular calculations.Code below can be simplified of course. 阅读全文
posted @ 2016-07-24 07:56 Tonix 阅读(218) 评论(0) 推荐(0)

摘要:Another interesting DP. Lesson learnt: how you define state is crucial.. 1. if DP[i] is defined as, longest wiggle(up\down) subseq AT number i, you wi 阅读全文
posted @ 2016-07-24 07:31 Tonix 阅读(323) 评论(0) 推荐(0)

摘要:DP or Greedy - they are all in O(n) In editorial, a beautiful Greedy solution is given: "To reach the last cloud in a minimum number of steps, always 阅读全文
posted @ 2016-07-21 09:31 Tonix 阅读(329) 评论(0) 推荐(0)

摘要:Another fun Greedy problem to work on: we simply go from first to second last person, as long someone is odd, we distribute bread to her and her next. 阅读全文
posted @ 2016-07-13 07:42 Tonix 阅读(333) 评论(0) 推荐(0)

摘要:Greedy - though simple, but fun! 阅读全文
posted @ 2016-07-13 07:17 Tonix 阅读(350) 评论(0) 推荐(0)

摘要:Fun with bits - carries etc. 阅读全文
posted @ 2016-07-07 07:59 Tonix 阅读(109) 评论(0) 推荐(0)