5 comments Thursday, September 27, 2007

Well, we all have recieved those email forwards about Google employees and the kind of freedom they enjoy at their office.

Wonder what it takes to work @ Google ???

A nerdy computer-aholic degree from Stanford is just not enough. Google actually expects its employs to be smart too.

Here is a sample set of questions that were asked in a Google interview. It is very probable that these questions were asked to a candidate applying for the post of a Software Engineer(in which case Smart-Ass replys may not work).




I make a humble attempt to answer these questions, which however does not imply that this is how I would have answered these questions in the interview. I tried to time limit myself to a around 2-3 mins per question.

---------------------------------------------------------------------------------------------
1. How many golf balls can fit in a school bus?

----------------------------------------------------------------------------------------------

1. The answer is not (Volume of bus)/(Volume of the ball.)Assuming the bus to be a hollow cuboid the answer is (l*b*h)/(d*d*d)l,b,h are the greatest integral multiple of d lesser than length, breadth and height resp.d is the diameter of the ball.

----------------------------------------------------------------------------------------------

2. You are shrunk to the height of a nickel and your mass is proportionally reduced so as to maintain your original density. You are then thrown into an empty glass blender. The blades will start moving in 60 seconds. What do you do?
----------------------------------------------------------------------------------------------


I'd hold the centre of the blade with all my might.


----------------------------------------------------------------------------------------------
3. How much should you charge to wash all the windows in Seattle?
----------------------------------------------------------------------------------------------

I dont know. Probably, one dollar per window. Or I d take a monthly salary for the task.


----------------------------------------------------------------------------------------------
4. How would you find out if a machine’s stack grows up or down in memory?
----------------------------------------------------------------------------------------------


Declare an array and compare the memory address of any 2 positions.

----------------------------------------------------------------------------------------------
5. Explain a database in three sentences to your eight-year-old nephew.
----------------------------------------------------------------------------------------------

It is a record of data.
Data could be any information.
Eg. School students record etc...


----------------------------------------------------------------------------------------------
6. How many times a day does a clock’s hands overlap?

----------------------------------------------------------------------------------------------

22


----------------------------------------------------------------------------------------------
7. You have to get from point A to point B. You don’t know if you can get there.

What would you do?
----------------------------------------------------------------------------------------------

Assuming no other extra factors. I would just move in any direction and incase I do not reach there I d trace back and look-in someother direction.

----------------------------------------------------------------------------------------------
8. Imagine you have a closet full of shirts. It’s very hard to find a shirt. So what can you do to organize your shirts for easy retrieval?

----------------------------------------------------------------------------------------------

Firstly, it is necessary to find out why is th retrival tough. Is it because they are not organised logically or rather because they are physically placed in an unreachable corner.Both the cases will have different solutions.


----------------------------------------------------------------------------------------------
9. Every man in a village of 100 married couples has cheated on his wife. Every wife in the village instantly knows when a man other than her husband has cheated, but does not know when her own husband has. The village has a law that does not allow for adultery. Any wife who can prove that her husband is unfaithful must kill him that very day. The women of the village would never disobey this law. One day, the queen of the village visits and announces that at least one husband has been unfaithful. What happens?

----------------------------------------------------------------------------------------------

Ahh, this is one question any Comp engg can answer.

----------------------------------------------------------------------------------------------
10. In a country in which people only want boys, every family continues to have children until they have a boy. if they have a girl, they have another child. if they have a boy, they stop. what is the proportion of boys to girls in the country?

----------------------------------------------------------------------------------------------

1:1. Because, the probability of a boy being born to a girl being born is 1:1.


----------------------------------------------------------------------------------------------
11. If the probability of observing a car in 30 minutes on a highway is 0.95, what is the probability of observing a car in 10 minutes (assuming constant default probability)?


----------------------------------------------------------------------------------------------



----------------------------------------------------------------------------------------------
12. If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands? (The answer to this is not zero!)


----------------------------------------------------------------------------------------------


7.5 degree




----------------------------------------------------------------------------------------------
13. Four people need to cross a rickety rope bridge to get back to their camp at
night. Unfortunately, they only have one flashlight and it only has enough light left for seventeen minutes. The bridge is too dangerous to cross without a flashlight, and it's only strong enough to support two people at any given time. Each of the campers walks at a different speed. One can cross the bridge in 1 minute, another in 2 minutes, the third in 5 minutes, and the slow poke takes 10 minutes to cross. How do the campers make it across in 17 minutes?
----------------------------------------------------------------------------------------------



- The underlined people cross over to the other side.

Side 1 Side 2 Time consumed

1,2,5,10 -- 2
5,10 1,2 1
1,5, 10 2 5
1 2,5,10 2
1,2 5,10 2
-- 1,2,5,10 ----

Total time consumed=12 min.

----------------------------------------------------------------------------------------------
14. You are at a party with a friend and 10 people are present including you and the friend. your friend makes you a wager that for every person you find that has the same birthday as you, you get $1; for every person he finds that does not have the same birthday as you, he gets $2. would you accept the wager?

----------------------------------------------------------------------------------------------


No.

----------------------------------------------------------------------------------------------
15. How many piano tuners are there in the entire world?

----------------------------------------------------------------------------------------------

:-?



















:-?



dont know

----------------------------------------------------------------------------------------------
16. You have eight balls all of the same size. 7 of them weigh the same, and one of them weighs slightly more. How can you find the ball that is heavier by using a balance and only two weighings?

----------------------------------------------------------------------------------------------

Divide the balls into 3 groups of 3balls,3balls and 2 balls.

Compare the 2 set of 3 balls.

1. Their weights are not same.
Take the heavier set and then compare any 2 balls. If they dont weigh the same youve got they heavier ball else the remaining 3rd ball is the heavier one.

2. Their weights are same.
Weigh the remaining 2 balls and get the heavier one.



----------------------------------------------------------------------------------------------
17. You have five pirates, ranked from 5 to 1 in descending order. The top pirate has the right to propose how 100 gold coins should be divided among them. But the others get to vote on his plan, and if fewer than half agree with him, he gets killed. How should he allocate the gold in order to maximize his share but live to enjoy it? (Hint: One pirate ends up with 98 percent of the gold.)

----------------------------------------------------------------------------------------------

This is a tough one. I took over 10 mins to solve this one. In all probablity I would not crack this in the interview.

0 comments Wednesday, September 26, 2007

A lot has happened on the Ram-Sethu controversy since the last post.



Jairam Ramesh has expressed his "opinion"(desire ??) that Ms. Amibika Soni resign over the goof-up.



Karunanidhi wants to know which Engg college did Sri Ram graduate from.(Maybe from the SriRam College of Engg., he was such a bright student that they named the college after him).
What Karunanidhi does not realise is that India is a democracy and that if the majority supports a belief then the question of logical or illogical becomes invalid.

The saffron brigade want the government to offer an unconditional public apology.

The government is reconsidering its stand on the whole issue, because of the religious sentiments of the people (also, that the polls are close).

However, Swaminathan S Anklesaria Aiyar suggests that the apparent economic benifit of demolishing the bridge is a mere mirage.

One striking point in the article is the claim that the actual distance that the ships will actually gain only 70 nm and not 215, as the govt claims (Ofcourse, the vercaity of either of the claims is disputable). It was actually unclear to me as to why were all the maps of the reduction in distance simliar to the one below. Was the distnace being calculated = The big red line - the small black one??? Whereas, the actual calculation should have been done on the basis of the actual path traced by the ships.

This brings me to the next question, where do these journalists get these pics from ? Was is given by an official government agency (which would mean that the attempt to misguide was delibrate) or were all the news agencies mess up the whole pictrial description on their own (actually, that is quite possible).

Whatever be the case, the govt should re-consider issue and verify the actual economic benefit of the project before Lord Ram decides to support BJP for the coming elections.

4 comments Monday, September 17, 2007

Ram-Setu is a mythical bridge which Lord Ram built to cross over to SriLanka. some of the Hindu organisations believe that this bridge is the same as the present bridge that connects India and SriLanka. More on the bridge here. Evidently, the bridge has a lot of religious significance for both Hindu and Islamic religions.












The political controversy surrounding the bridge is this: Congress has taken up a project to demolish a part of the Adams Bridge for economic benifit. The BJP feels that the bridge is a sign of Hindutva and that the anti-hindu, pro-minority, Congress Govt should not allow the bridge to be demolished.


Now, the various scientific organsiations have only been able to conclude that there is no evidence to suggest that the bridge is man-made. This in itself is inconclusive and thus cannot be used as an evidence to necessarrily conclude the baselessness of the Ram-Setu being the bridge Ram used to cross over to Lanka.


The economic advantage of demolishing the bridge is that a number of large vessels which have to reach the east coast of India travel along routes that circumscribe Sri Lanka (approx: shown by the red line) and effectively travel 400 odd extra kilometers. Demolishing the bridge will allow these ships to travel a shorter route (black line).






The Ram-Sethu is more than just another controversy. For some, it is a matter of religion a symbol of their Gods existence for others a simple hindrance in economic development effectively it is a debate of myth or belief over religion. Now starts the accusation game of the politicians with each party blaming the other of cheating the public, people calling DMK leader Dravidian godless man etc…


For most educated people it boils down to: if we allow such myths to hamper the decision making of our country where do we stop. The debate is not just about Ram-Sethu. It is a more important debate of what is acceptable in the society as development at the cost of emotions and what all is not.
To elaborate on this:

1.) If a group of 50 individuals believe that all construction work in the country should cease immidiately because they belive the Earth is their mother and that constructiion work hurt their mother and therefore human sentiments. Should all the work actually be stopped?

We will very happily term that group of people as retards and happily ignore them.

2.) Instead, if a major oilfield is discovered underneath a small temple / mosque. Is it right for the government to destroy / displace the monument?

Most of us would agree that it is acceptable because not many people believe in the temple anyway and also the economic benefit that will be gained for so many other people are massive therefore its agreeable.

3.) Alternatively, if a small oilfield (Assume the oilfield to be economically viable) is discovered under a place of relatively more importance, will it still be as OK to destroy / displace the monument for the oilfield?

Probably No.

4.) In an extreme situation, if the temple is as impotant as say the Tirupati temple or Lal Mandir or Haji Ali then?

Hell, NO!!!!

A lot of people believe or have written or said, in reference to Ram-Sethu, that orthodox myth(s) cannot and should not decide the economic policies of a country and therefore should not be allowed to interfere in such an important matter. In principle I agree that development of a country should not be hindered by myth(s). But, all the same, we cannot trample over the emotions and beliefs of thousands of people just for economic benefit. Isn’t this what democracy is all about?

Another politician-gentleman on “We-the-People” smugly pointed out that industrial growth around the Taj-Mahal had been stopped by a Supreme Court ruling, responding to a PIL, and that this is similiar to the Ram-Sethu bridge controversy. I would like to point out that the two cases are starkly different. This is so, because

1.) Taj-Mahal is not a religious symbol, instead it is a symbol of Indian heritage and architectural magnificence

2.) Taj-Mahal is in itself an industry; it generates employment and revenue for the nation

Coming back to the question: should Ram-Sethu be destroyed or not?

Just because Lord Ram might have built the bridge should we not save it?

Can we just destroy a small column of the 40 km bridge?

I dont know. It is tough to appreciate the logic/belief of the believers. Till I get to know their exact stand this is as much as I can say.

P.S:- I am looking for the video of the "We the people episode". Incase you have it please let me know.