Intern Interview Questions in United States | Glassdoor.co.in

Intern Interview Questions in United States

35,309

intern interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Suppose you had eight identical balls. One of them is slightly heavier and you are given a balance scale . What's the fewest number of times you have to use the scale to find the heavier ball?

60 Answers

3 times. (2^3 = 8)

Two. Split into three groups of three, three, and two. weigh the two groups of three against each other. If equal, weigh the group of two to find the heavier. If one group of three is heavier pick two of the three and compare them to find the heaviest.

Brian - this would be correct if you in fact were using a weighing scale, and not a balance scale. The ability to weigh one group against another with a balance scale allows Marty's answer to be a correct answer. Although - the question as worded provides a loophole. If it had been worded as "What's the fewest number of times you have to use the scale to CONSISTENTLY find the heavier ball", then Marty's answer would be the only correct answer. However, it is possible that you could get lucky and find the heavier ball in the first comparison. Therefore, the answer to the question as stated, is ONE.

One or more comments have been removed.
Please see our Community Guidelines or Terms of Service for more information.

How many different ways can you get water from a lake at the foot of a mountain, up to the top of the mountain?

28 Answers

Find the max value in an array. The array is "semi-sorted". Here is an example: { 1 3 4 7 9 10 12 13 12 6 3 } As you can see, the array increases and then decreases at one point (13).

20 Answers

Suppose we hire you, and you and the rest of the new interns decide to go buy a cup of coffee. Each intern purchases one cup of coffee. One of the interns suggests everyone play a game. Everyone will flip a fair coin, dividing the group of interns into two subgroups: those that got heads and those that got tails. The game is this: whichever group is smaller evenly splits the cost of everyone's cup of coffee (i.e. if there are 5 interns, 3 get H, 2 get T, then the two interns that got tails each buy 2.5 cups of coffee). However, nothing says you need to play this game. You can choose to buy your own cup of coffee and not play the game at all. The question: Should you play this game? (Note: You may assume that there is an odd number of interns, so there are no ties, and that if everyone gets H or everyone gets T, then everyone loses and just buys their own cup of coffee).

18 Answers

What was one of your best achievements on a project in the past?

19 Answers

Find the second largest element in a Binary Search Tree

16 Answers

Given two strings representing integer numbers ("123" , "30") return a string representing the sum of the two numbers ("153")

17 Answers

To find and return the common node of two linked lists merged into a 'Y' shape.

13 Answers

You are in a boat in a pool with a rock in your hand. You throw the rock into the pool. Does the water level rise, drop, or stay the same?

14 Answers

Determine if an array from 1..n has a duplicate in constant time and space.

14 Answers
110 of 35,309 Interview Questions