![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 455 阅读 · 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 · 621 阅读 · 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 · 648 阅读 · 0 评论 -
[Google] print the outline of a complete binary tree in anti-clockwise direction
Question:原创 2014-07-27 00:57:49 · 569 阅读 · 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 · 873 阅读 · 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 · 546 阅读 · 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 · 537 阅读 · 0 评论