Paper : Google Placement Paper and Sample Paper
Google Placement Paper and Sample Paper
This Google has conducted recruitment process in our collage.The criteria was first 30% topper in the class.So around 40 student has attended the test & only 4 could clear the test. Test consist of 15 question based on c,c++,and data structure.and two c programs. So i am listing some of the question as i remembered.
1. Solve this cryptic equation, realizing of course that values for M and E could be interchanged. No leading zeros are allowed.
This can be solved through systematic application of logic. For example, cannot be equal to 0, since . That would make , but , which is not possible. Here is a slow brute-force method of solution that takes a few minutes on a relatively fast machine:
This gives the two solutions :
777589 - 188106 == 589483
777589 - 188103 == 589486
Here is another solution using Mathematica's Reduce command:
A faster (but slightly more obscure) piece of code is the following:
Faster still using the same approach (and requiring ~300 MB of memory):
Even faster using the same approach (that does not exclude leading zeros in the solution, but that can easily be weeded out at the end):
Here is an independent solution method that uses branch-and-prune techniques: And the winner for overall fastest:
2. Write a haiku describing possible methods for predicting search traffic seasonality. MathWorld's search engine seemed slowed this May. Undergrads prepping for finals.
3.
1
1 1
2 1
1 2 1 1
1 1 1 2 2 1
What's the next line?
312211.
This is the "look and say" sequence in which each term after the first describes the previous term: one 1 (11); two 1s (21); one 2 and one 1 (1211); one 1, one 2, and two 1's (111221); and so on. See the look and say sequence entry on MathWorld for a complete write-up and the algebraic form of a fascinating related quantity known as Conway's constant.
4. You are in a maze of twisty little passages, all alike. There is a dusty laptop here with a weak wireless connection. There are dull, lifeless gnomes strolling around. What dost thou do?
A) Wander aimlessly, bumping into obstacles until you are eaten by a grue.
B) Use the laptop as a digging device to tunnel to the next level.
C) Play MPoRPG until the battery dies along with your hopes.
D) Use the computer to map the nodes of the maze and discover an exit path.
E) Email your resume to Google, tell the lead gnome you quit and find yourself in whole different world [sic].
In general, make a state diagram . However, this method would not work in certain pathological cases such as, say, a fractal maze. For an example of this and commentary, see Ed Pegg's column about state diagrams and mazes .
5. What's broken with Unix?
Their reproductive capabilities.
How would you fix it?
6. On your first day at Google, you discover that your cubicle mate wrote the textbook you used as a primary resource in your first year of graduate school. Do you:
A) Fawn obsequiously and ask if you can have an autograph.
B) Sit perfectly still and use only soft keystrokes to avoid disturbing her concentration
C) Leave her daily offerings of granola and English toffee from the food bins.
D) Quote your favorite formula from the textbook and explain how it's now your mantra.
E) Show her how example 17b could have been solved with 34 fewer lines of code.
7. Which of the following expresses Google's
over-arching philosophy?
A) "I'm feeling lucky"
B) "Don't be evil"
C) "Oh, I already fixed that"
D) "You should never be more than 50 feet from food"
E) All of the above
8. How many different ways can you color an icosahedron with one of three colors on each face?
For an asymmetric 20-sided solid, there are possible 3-colorings . For a symmetric 20-sided object, the Polya enumeration theorem can be used to obtain the number of distinct colorings. Here is a concise Mathematica implementation: What colors would you choose?
9. This space left intentionally blank. Please fill it with something that improves upon emptiness.
For nearly 10,000 images of mathematical functions, see The Wolfram Functions Site visualization gallery .
10. On an infinite, two-dimensional, rectangular lattice of 1-ohm resistors, what is the resistance between two nodes that are a knight's move away?
This problem is discussed in J. Cserti's 1999 arXiv preprint . It is also discussed in The Mathematica GuideBook for Symbolics, the forthcoming fourth volume in Michael Trott's GuideBook series, the first two of which were published just last week by Springer-Verlag. The contents for all four GuideBooks, including the two not yet published, are available on the DVD distributed with the first two GuideBooks. 11. It's 2PM on a sunny Sunday afternoon in the Bay Area. You're minutes from the Pacific Ocean, redwood forest hiking trails and world class cultural attractions. What do you do?
12. In your opinion, what is the most beautiful math equation ever derived? There are obviously many candidates. The following list gives ten of the authors'
favorites:
1. Archimedes' recurrence formula : , , ,
2. Euler formula :
3. Euler-Mascheroni constant :
4. Riemann hypothesis: and implies
5. Gaussian integral :
6. Ramanujan's prime product formula:
7. Zeta-regularized product :
8. Mandelbrot set recursion:
9. BBP formula :
10. Cauchy integral formula:
An excellent paper discussing the most beautiful equations in physics is Daniel Z. Freedman's " Some beautiful equations of mathematical physics ." Note that the physics view on beauty in equations is less uniform than the mathematical one. To quote the notnecessarily- standard view of theoretical physicist P.A.M. Dirac, "It is more important to have beauty in one's equations than to have them fit experiment."
13. Which of the following is NOT an actual interest group formed by Google employees?
A. Women's basketball
B. Buffy fans
C. Cricketeers
D. Nobel winners
E. Wine club
14. What will be the next great improvement in search technology? Semantic searching of mathematical formulas.
See : http: // functions.wolfram.com/About/ourvision.html for work currently underway at Wolfram Research that will be made available in the near future.
15. What is the optimal size of a project team, above which additional members do not contribute productivity equivalent to the percentage increase in the staff size?
A) 1
B) 3
C) 5
D) 11
E) 24
16. Given a triangle ABC, how would you use only a compass and straight edge to find a point P such that triangles ABP, ACP and BCP have equal perimeters? (Assume that ABC is constructed so that a solution does exist.) This is the isoperimetric point , which is at the center of the larger Soddy circle. It is related to Apollonius' problem . The three tangent circles are easy to construct: The circle around has diameter , which gives the other two circles. A summary of compass and straightedge constructions for the outer Soddy circle can be found in " Apollonius' Problem: A Study of Solutions and Their Connections" by David Gisch and Jason M. Ribando.
17. Consider a function which, for a given whole number n, returns the number of ones required when writing out all numbers between 0 and n. For example, f(13)=6. Notice that
f(1)=1. What is the next largest n such that
f(n)=n?
Q1) What is the value of i after execution of the following program.
void main()
{
long l=1024;
int i=1;
while(l>=1)
{ l=l/2;
i=i+1;
}
}
a)8 b)11 c)10 d)100 ans:b
Q2) This question is based on the complexity ...
Q3)
s->AB
A->a
B->bbA
Which one is false for above grammer..
Some Tree were given & the question is to fine preorder traversal.
Q4) One c++ program,to find output of the program..
Q5) If the mean faliure hour is 10,000 and 20 is the mean repair hour.If the printer is used by 100 customer,then find the availability.
1)80% 2)90% 3)98% 4)99.8% 5)100%
Q6)One question on probability...
Q7)In a singly linked list if there is a pointer S on the first element and pointer L is on the last element.Then which operation will take more time based on the lenght of the list.
1)Adding element at the first.
2)adding element at the end of the list.
3)To exchange the fisrt 2 element.
4)Deleting the element from the end of the list.
ans:2 check it!
3 more question to fine the output of the program. and rest of the question was based on data structure, some condition where given and we have to conlude either y or n The second section was coding...
1)Write a fucntion to multiply 2 N*N matrix Write test cases for ur code.
2) S contains the set of positive integer.Find the largest number c such that c=a+b where a,b,c are distict number of the set.
say there are 100 families, that means there will be exactly 100 boys. Lets figure out how many girls.
50 families will have a girl on their first try,
25 will have a girl on their second try
12.5 on third and so on.
so 1/2 of the population has at least 1 girl, 1/4 has at least 2 and so on.
this reduces to avg # of girls per family = 1/2 + 1/4 + 1/8? = 1
so the proportion is 1 to 1
Cake is a three dimentional thing. Irrespective of the size of a rectangular piece cut from it, if we cut the cake horizontally from the middle of its height, it?ll be cut in two equal halves.
the first round starts at midnight when both hands are on 12 overlapping, then an overlap occurs after each hour before noon, so, this is 11 overlaps, + 1 at noon, + 11 more on the second round, making it 23 overlaps per day, and the 24th one will be actually the first overlap of the next day,done
Start from a easy one. A straight line passing through the center of a rectangle will cut the rectangle into two halves with same area.
Now the problem. A line passing through both center will cut the cake into tow halves with same area.
Car:
qbaler is correct I think. but i can not find what?s wrong with following calculation.
If the possibility of seeing 1 car in 10 min is p, then:
1) chance of seeing 1 car in the first 10 min = p*(1-p)^2
2) .. = (1-p)*p*(1-p)
3)so, the chance of seeing 1 car in 30 min is:
3*p*(1-p)^2 = 0.95
=> p = 1.465
the answer to the car question is
cuberoot 95/ cuberoot 100
the answer is easy.
imagine that you roll a dice. what is the possibility to have a 1? 1/6 right
roll it twice.. it s 1/36
so think that 30 minutes is three times 10 minutes.
to 95/100 (95%) is a cube of three numbers.
which gives the correct result as cuberoot 95/ cuberoot 100
With two dice, there are 36 possible outcomes. I won?t list them all, but here are a few:
(1,1), (1,2), (1,3), ?
(2,1), (2,2), ?
(3,1), ?
There are several favorable outcomes where a 1 is present out of the 36 rolls. There are 6 ways for the first die to be any number while the second die is a 1, and there are 6 ways for the second die to be any number while the second die is 1. Having counted (1,1) twice, you end up with 11/36 as the probability of having at least one 1 show up when you roll two dice.
Unless you are asking for (1,1), then the probability is 1/36.
The question doesn?t ask ?What is the probability of seeing 1 car in 10 minutes, and no cars in the other 20 minutes??
Also, your final answer of p = 1.465 is not possible because that value is greater than 1!
Let T have x, then M has x+20.
They both have to give sth so they have 21 between them.
So x should be 1, so that M gives 20 and T gives 1 to make 21 between them.
probability of having a boy in the first try is 0.5
and the second is 0.25 etc. assuming no kids die then
the number of girls would follow:
x * (0.5 + 0.25 + 0.125 + ?) or Sum(1/(2^i), i=1..infinity) which is equal to 2.
So on average there should be 1 boy to 2 girls.
of the depth of the cake it will be 2 equal pieces, no matter what the
size or shape or place of the cut?
And for the clock? answer is 22?this can be found easily , as each overlap of the 2 hands occur at 12/11th of an hour?
Solution:-
We need to identify two things:
1. Angle movement per hour :- 360/12 = 30 degree
3. Angle movement per minute corresponding to per hour :- 0.5 (1 hour = 30 degree; 60 minute = 30 degree; 1 minute = 30/60 = 0.5 degree)
So, 15 minute movement will create angle of 7.5 degree (.5 * 15) between hour and minute hand.
2. buy some dictionary first
3. nothing queen doesnt live in the city and her husband was unfaithful
4. take 6 then take 2
5. find the man with the missing piece and get it
6. less then pianos
7. joy is to read this and know some questions so u can talk to yourself you are not dump
8. $20 and $1
9. dont understand my english poor, dont know when they achieve their mit and the sentence with 72
10. if its not 0 so its 360
11. 1&2 then 1 come back then 5&10 then 2 come back then 1&2
12. 0.95
13. girls > boys cause they want boys
14. hmm again my english poor dont understand the sentence
No matter what strategy people use, every time someone gets pregnant, there is a 50/50 chance of boy/girl. The final ratio is 1:1.
A better formed problem would be a room full of coin flippers. If everyone flipped until they got a Head, in the end, you would expect a total of 50% heads and 50% tails. Figure out a different answer, then take it to Vegas and try to beat a roullette wheel :)
I would first ask myself what criteria I normally use when looking for a shirt. I would then sort sort them according to those criteria, pretty much like a DBA does when indexing tables to optimize them most frequent queries.
import random
boysCount = 0
girlsCount = 0
for a in xrange(10000000):
isGirl = random.random()
while isGirl
A: Yes.
See if you notice the pattern (0 = outside, 1 = inside):
000000
000001
000011
000010
000110
000111
000101
000100
001100
001101
001111
001011
001001
001000
011000
011100
011110
011111
010111
010011
010001
010000
This pattern will cover every possible combination and can be repeated for any number of bits (people). Other valid patterns may exist.
A:
I?d start by googling ?A B?, gathering as much information as possible;
Then, I?d try to talk to someone in the team knowledgeable on those points;
Next, I?d go back to my lead and make sure I?ve understood what A and B are;
Hopefully, this should give me enough information start the journey;
00:00, 01:05, 02:10, 03:15, 04:20, 05:25, 06:30, 07:35, 08:40, 09:45, 10:50,
12:00, 13:05, 14:10, 15:15, 16:20, 17:25, 18:30, 19:35, 20:40, 21:45, 22:50
Assuming:
* World population 6 billion
* One in 10000 people own a piano
* One tuner will tune, on average, 2 pianos a day
* A piano needs tuning once every year
There are 600000 pianos;
They will require 600000 tuning every year
One single tuner can tune 520 pianos a year (2 tunes x 260 week days in the year)
Approximately 1153 piano tuners are required.
In questions like this, they are not really interested in the answer you give, but how did you get to it. Stating your assumptions as clearly as possible helps. Also, you may want to get to your answer using two or rationales. In this case, you may want to guess the number of pianos by the number of house holds in the world and the ratio of those with enough money to own a piano, etc.
Unfaithful husband - the only woman who isn?t aware of the infidelity immediatelly kills her husband (everyone else already knows he did it, including the Queen - how much more proof do you need?).
360/(12*4)= 7.5 degree is the angle ?where 4 comes from (60/15)
The first grad says to the second: ?how have you been??
Second: ?Great! I got married and I have three daughters now?
First: ?Really? how old are they??
Second: ?Well, the product of their ages is 72, and the sum of their ages is the same as the number on that building over there..?
First: ?Right, ok.. oh wait.. I still don?t know?
second: ?Oh sorry, the oldest one just started to play the piano?
First: ?Wonderful! my oldest is the same age!? Problem: How old are the daughters?
? The answer: Unknown.
The solution makes false assumptions:
1.) The guy knew that two possible combinations had the sum 14
2.) The guy could see the building number
3.) Two children cannot be the same age.
Key #3 is the most important. It is possible to have two six year olds and a two year old. Twins. With twins, there is ALWAYS an older child. So, it is perfectly legit to say that you have two six year olds, one two year old, and the oldest began playing piano.
Cake? Horizontal cut answers assume the rectangle removed is the same height as the cake.
As pointed out by Jay Jay, if I asked you any questions like these it is your thinking process that I care about. Are you easily discouraged by a tough situation? Do you find negatives or solutions? Can you venture a solution even if it might be wrong?