Tony's Log

Algorithms, Distributed System, Machine Learning

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

02 2015 档案

摘要:All about pruning and duplication removal. Took me several submissions to get it AC:#include #include #include #include #include #include using namesp... 阅读全文
posted @ 2015-02-28 07:52 Tonix 阅读(176) 评论(0) 推荐(0)

摘要:An iterative 'simulation' problem:#include #include #include #include #include using namespace std;int main() { int t, n, c, m; cin >> t; whi... 阅读全文
posted @ 2015-02-27 15:10 Tonix 阅读(149) 评论(0) 推荐(0)

摘要:The punch line to this problem is the support to very very large int handling. I tried C++ code for multiple times, but it only passed first 13~ cases 阅读全文
posted @ 2015-02-27 14:58 Tonix 阅读(150) 评论(0) 推荐(0)

摘要:You may also have seen this problem in interview questions. Two cases:1. all chars have even numbers of it2. only 1 char have odd numbers of it#includ... 阅读全文
posted @ 2015-02-27 07:05 Tonix 阅读(171) 评论(0) 推荐(0)

摘要:https://www.hackerrank.com/challenges/angry-childrenAmong N ints, pick K with min 'unfairness' (max of k - min of k). Here's the strategy: larger numb... 阅读全文
posted @ 2015-02-27 06:47 Tonix 阅读(537) 评论(0) 推荐(0)

摘要:Typical rolling-hash solution. That is, Boyer-Moore algorithm variation.class Solution {public: inline int encode(char c) { switch (c) ... 阅读全文
posted @ 2015-02-09 08:29 Tonix 阅读(364) 评论(0) 推荐(0)