Interview
MrRoyLee
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[Google]maximum n such that the array consists at least n values >=n
Question: Given an unsorted array of integers, you need to return maximum possible n such that the array consists at least n values greater than or equals to n. Array can contain duplicate values.原创 2014-07-26 17:53:04 · 516 阅读 · 0 评论 -
[Google]Find numbers of nodes in a BST in the range [low,high]
Question: Given a Binary Search tree of integers, you need to return the number of nodes having values between two given integers. You can assume that you already have some extra information at原创 2014-07-27 00:01:32 · 687 阅读 · 0 评论 -
[Google]find a,b,c such that a+b+c<=d
Question: Suppose you have a million integer numbers. Return all possible values of a,b and c such that a+b+c d will be provided to you. ex: if the numbers are 1,2,3,4,5,6,7 and d=7 [原创 2014-07-28 10:42:01 · 712 阅读 · 0 评论 -
[Google] print the outline of a complete binary tree in anti-clockwise direction
Question:原创 2014-07-27 00:57:49 · 628 阅读 · 0 评论 -
[Google]create a Random number generator
Question: create a Random number generator without using the java in build Random class? Solution:原创 2014-07-27 12:27:09 · 953 阅读 · 0 评论 -
[Google]Rearrange White Spaces
Question: Given a string with multiple spaces write a function to in-place trim all spaces leaving a single space between words e.g. _ _ _ Hello _ _ _ World _ _ _ Hello _ World _ _ _ _原创 2014-07-27 16:38:43 · 608 阅读 · 0 评论 -
[PAT]Battle Over Cities
#include #include #include #include using namespace std; class QU//并查集的 { public: QU(int n) { fa=new int[n+2]; for(int i=1;i<=n;i++)fa[i]=i; cou=n; } ~QU() { delete[] fa; }原创 2014-09-01 10:38:13 · 607 阅读 · 0 评论
分享