Tony's Log

Algorithms, Distributed System, Machine Learning

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

2015年5月13日

摘要: O(n): Sliding window:class Solution {public: int minSubArrayLen(int s, vector& nums) { int len = nums.size(); if (len == 0) return... 阅读全文
posted @ 2015-05-13 15:43 Tonix 阅读(234) 评论(0) 推荐(0)

摘要: Topological sorting. This is my DFS solution. Please note that I used _rec to avoid duplicate checking.class Solution {public: map rec; set _rec... 阅读全文
posted @ 2015-05-13 14:37 Tonix 阅读(150) 评论(0) 推荐(0)

摘要: Implementation problem.class TrieNode {public: // Initialize your data structure here. TrieNode() { c = 0; bIsLast = false; } ... 阅读全文
posted @ 2015-05-13 13:28 Tonix 阅读(267) 评论(0) 推荐(0)