Tony's Log

Algorithms, Distributed System, Machine Learning

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

01 2016 档案

摘要:This is 'Difficult' - I worked out it within 45mins, and unlocked HackerRank Algorithm Level 80 yeah! So the idea is straight forward: 1. sort the inp 阅读全文
posted @ 2016-01-28 14:16 Tonix 阅读(321) 评论(0) 推荐(0)

摘要:Just for study from its editorial~Lesson learnt: an optimized Hungarian Algorithm: Hopcroft-Karp Algorithm (a batched version of Hungarian)A very good... 阅读全文
posted @ 2016-01-27 14:32 Tonix 阅读(336) 评论(0) 推荐(0)

摘要:Interesting Greedy.. classichttps://leetcode.com/discuss/75529/c-simple-solution-easy-understandingclass Solution {public: string removeDuplicateLe... 阅读全文
posted @ 2016-01-27 07:47 Tonix 阅读(187) 评论(0) 推荐(0)

摘要:My naive Fenwick solution (value space) failed with the last test case in which there's INT_MIN\INT_MAX..So I learnt a smarter thought on Fenwick:http... 阅读全文
posted @ 2016-01-27 05:57 Tonix 阅读(207) 评论(0) 推荐(0)

摘要:Visualize the unzip process.class Solution {public: ListNode* oddEvenList(ListNode* head) { if (!head || !head->next) return head; Li... 阅读全文
posted @ 2016-01-23 06:28 Tonix 阅读(202) 评论(0) 推荐(0)

摘要:Nothing special. Point is, how clean can you do it?class Solution {public: int maxSubArrayLen(vector& nums, int k) { int n = nums.size()... 阅读全文
posted @ 2016-01-06 18:33 Tonix 阅读(164) 评论(0) 推荐(0)

摘要:1AC. Intuitive DP. But please note the if condition, there's a trick - we cannot build upon an invalid dp slot.class Solution {public: int coinChan... 阅读全文
posted @ 2016-01-06 18:29 Tonix 阅读(197) 评论(0) 推荐(0)