Interview Questions - Non Technical

1. why manhole covers are round.

*so they dont fall in.
*easy to manufacture.
*easy to roll around.

2. 8 tennis balls exactly same look. 7 weigh same and 1 is heavier. You have one balance, find the heavier ball in 2 weighing.

This is really a sorting question. You have to apply quick sort but with a twist. You have to make it even quicker.

3. You are captain of angry pirate ship. You have to divide the loot. If more than half disagree with you, you die. How will you share the loot that you get the good share and survive.

(Divide and rule ) Make half of them happier, by the giving them just more than what they should expect.

But here is the twist in the question, make sure those pirates do not believe in fairness and do not believe in equality and humanity.


4. Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7.

scale the random number generated. just like (7/5) * f()

5.


Comments

Popular posts from this blog

SQL

Analytics

HIVE