摘要:
2014-05-08 22:55题目链接原题:Given a list of strings. Produce a list of the longest common suffixes. If it asks for longest common substring, then building ... 阅读全文
摘要:
2014-05-08 22:42题目链接原题:How would you split a search query across multiple machines?题目:如何把一个搜索query分发到多个机器上?解法:又是“Guy”出的题目。对query字符串算取数字签名,然后对集群的机器数量取模... 阅读全文
摘要:
2014-05-08 22:27题目链接原题:What's the tracking algorithm of nearest location to some friends that are located in a grid region?题目:在一个格点坐标的地图里,如何追踪到一个朋友附近最... 阅读全文
摘要:
2014-05-08 22:09题目链接原题:Implement a class to create timer object in OOP题目:用OOP思想设计一个计时器类。解法:我根据自己的思路,用clock()函数为工具,提供启动、停止、显示时长、重置四个方法。代码: 1 // http://... 阅读全文
摘要:
2014-05-08 21:33题目链接原题:largest number that an int variable can fit given a memory of certain size题目:给定特定内存大小,请问int型的变量能表示的最大整数是多少?解法:这个“Guy”出的题目总是这样表意... 阅读全文
摘要:
2014-05-08 09:32题目链接原题:Given a binary tree, how would you copy it from one machine to the other, assume you have a flash drive. I believe we should wr... 阅读全文
摘要:
2014-05-08 08:26题目链接原题:Given a preorder traversal, create a binary search tree in optimized time题目:给定一个二叉搜索树的前序遍历,请重建这棵树。要求最优化算法。解法1:这人每次出题都要求“最优算法”,自... 阅读全文
摘要:
2014-05-08 05:16题目链接原题:Given a circle with N defined points and a point M outside the circle, find the point that is closest to M among the set of N. ... 阅读全文