11 2014 档案
摘要:前阵子找工作的时候经常会看到epoll多路复用的知识点,无奈自己一点都不懂。慌忙之际也只能去了解个大概。所以最近闲下来之后想要基于epoll机制实现一个比较有用的东西,刚好最近又想爬些东西,希望这次能够写一个高效一点的爬虫。以前只看过一点点的nutch,自己写的就是用python的几个简单功能来爬,...
阅读全文
摘要:平常最多是用vim来编辑单个文件,看看源码。就是写几k行代码时也没有用一些其他的插件,只是设置了高亮等一些自带的属性。这样的好处是,换到任何一台新机上都能立马使用。网上流传了大量的“vim命令合集”,“把vim打造成一个IDE”之类的文章,我觉得至少对我来说意义不大。我觉得把以下这些命令用熟的话,v...
阅读全文
摘要:天使投资:种子期,可能只有一个概念什么都没开始,或者刚开始运营,还没有出来产品,或者出来了产品却没有大规模开卖。此时浇浇水,种子会长大,你就是一个天使。种子会长大,成长的过程之中还是有许多的风险,需要更多的呵护。于是Venture Capital就有了风险投资的名字,A轮之后就是B轮。如果你愿意还可...
阅读全文
摘要:资源列表官网上下载最新的cocos2d-x-3.3。安装JDK,Eclipse,CDT插件,ADT插件。下载Android SDK,更新。因为国内经常访问不了google,用vpn速度也有点慢。网上搜来的ip还可以用,改hosts文件。210.242.125.108 dl-ssl.google.co...
阅读全文
摘要:找工作到此为止了。希望有好消息。其实每一轮面都有问题,我也不知道是大是小,希望有机会进入下一轮,希望走得越远。昨天在mitbbs上看到一句话深有感触:“表面上看是差一点点,或者说运气不好,实际上是毫无机会,因为比你优秀的人太多了,如果你不能表现完美无可挑剔,总是能被他们找到拒你的理由.我能做到每次都...
阅读全文
摘要:Given a binary tree, a target node in the binary tree, and an integer value k, print all the nodes that are at distance k from the given target node. ...
阅读全文
摘要:Given inorder and level-order traversals of a Binary Tree, construct the Binary Tree. Following is an example to illustrate the problem.BinaryTreeInpu...
阅读全文
摘要:Given a BST, transform it into greater sum tree where each node contains sum of all nodes greater than that node.自己想的复杂了,其实就是一个反向的inorder。新的值就是前面所有元素的...
阅读全文
摘要:Given a very large n-ary tree. Where the root node has some information which it wants to pass to all of its children down to the leaves with the cons...
阅读全文
摘要:Given a binary tree, print it vertically. The following example illustrates vertical order traversal. 1 / \ 2 3 / \ / \ 4 5 6 7 \ \ 8 9The output of p...
阅读全文
摘要:Given a string and a positive integer d. Some characters may be repeated in the given string. Rearrange characters of the given string such that the s...
阅读全文
摘要:A suffix array is a sorted array of all suffixes of a given string. The definition is similar to Suffix Tree which is compressed trie of all suffixes ...
阅读全文
摘要:In graph theory, a Eulerian trail (or Eulerian path) is a trail in a graph which visits every edge exactly once. Similarly, an Eulerian circuit or Eul...
阅读全文
摘要:8.2Imagine you have a call center with three levels of employees: respondent, manager, and director. An incoming telephone call must be first allocate...
阅读全文
摘要:Implement pow(x, n).快速求幂,注意n是负数的情况。 1 class Solution { 2 public: 3 double pow(double x, int n) { 4 double ans = 1.0; 5 int symbol ...
阅读全文
摘要:The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total numb...
阅读全文
摘要:分布式缓存出于如下考虑,首先是缓存本身的水平线性扩展问题,其次是缓存大并发下的本身的性能问题,再次避免缓存的单点故障问题(多副本和副本一致性)。分布式缓存的核心技术包括首先是内存本身的管理问题,包括了内存的分配,管理和回收机制。其次是分布式管理和分布式算法,其次是缓存键值管理和路由。Memcache...
阅读全文
摘要:Given API: int Read4096(char* buf); It reads data from a file and records the position so that the next time when it is called it read the next 4k cha...
阅读全文
摘要:匈牙利算法,求二分图最大匹配。若P是图G中一条连通两个未匹配顶点的路径,并且属于M的边和不属于M的边(即已匹配和待匹配的边)在P上交替出现,则称P为相对于M的一条增广路径。(M为一个匹配)由增广路的定义可以推出下述三个结论:P的路径长度必定为奇数,第一条边和最后一条边都不属于M。所以Line 25-...
阅读全文
摘要:Time limit : 2sec / Stack limit : 256MB / Memory limit : 256MBProblemCarol is a great alchemist.In her world, each metal has a name of 2N (N is an int...
阅读全文

浙公网安备 33010602011771号