Wednesday, April 29, 2015

Brain Teaser in Apple

Recently, I saw an article about the job interview in Apple. The author gathered 25 strangest questions the candidates were asked.

Business Insider: The trickiest questions Apple will ask in a job interview

Some questions are quite common such as "What are your failures, and how have you learned from them?" Actually, I have made this question in the job interview in the organization I belonged.

On the other hand, there are some questions categorized in Brain Teaser. Apple also adopted this type of puzzle as well as Google.

I tried these questions below:

1. "You have a 100 coins laying flat on a table, each with a head side and a tail side. 10 of them are heads up, 90 are tails up. You can't feel, see or in any other way find out which side is up. Split the coins into two piles such that there are the same number of heads in each pile."

It is regrettable that I could not solve this problem without searching the answer. The model answer may be:

"Split into two piles, one with 90 coins and the other with 10. Flip over every coin in the pile with 10 coins."

In the website of discussion, some other tricky answers are submitted. For example:

"Just split into two piles, each with 50 coins. The question only asks 50 heads in each one, it doesn't ask for the number of heads up!!!"

It is quite cool!

2. "There are three boxes, one contains only apples, one contains only oranges, and one contains both apples and oranges. The boxes have been incorrectly labeled such that no label identifies the actual contents of the box it labels. Opening just one box, and without looking in the box, you take out one piece of fruit. By looking at the fruit, how can you immediately label all of the boxes correctly?"

This is a simple question. I am confident that I could make the correct answer in the real interview.

"I take out one piece of fruit from the box labelled as both apples and oranges. If I took an apple, this box should be labelled as apples, and the box labelled as apples should be amended to oranges, the box labelled as oranges to apples and oranges, as well. If I took an orange, it should be the box of oranges, on the contrary."

Or you may answer below:

" I will take the box labeled as oranges. It should contain an apple at least. And Apple is my company!"

3. "If you're given a jar with a mix of fair and unfair coins, and you pull one out and flip it 3 times, and get the specific sequence heads heads tails, what are the chances that you pulled out a fair or an unfair coin?"

This question is an issue of chance. I am not sure the exact means to calculate the possibility that this coin is twisted. A fair coin has an equal opportunity of the both side. It means that 1.5 times of the head and 1.5 times of the tails should appear in 3 trials. The result was 2 heads and 1 tail. But it is quite natural because there is no “0.5 times of the head or tail.”

If you adopt Chi-square test to these numbers, the P value will be calculated to 0.68. It means that a fair coin could produce this result or more biased one by 68%. However, it does not mean that this coin is biased with the 32% possibility. Furthermore, Chi-square test should not adopted in such a few amount of trial.

After all, I could not calculate the exact possibility of the fairness of this coin. Maybe, there is a more simple answer.

4. “If you have 2 eggs, and you want to figure out what's the highest floor from which you can drop the egg without breaking it, how would you do it? What's the optimal solution?”

This is an extremely difficult question. I do not think someone can solve it without any previous information about this type of questions.

You should find the best strategy to identify the height the egg can survive. The simplest way is to test the lowest the first and to increase the height gradually. But it is not optimal.

Estimate that the highest height is 10m. You can try 5m at first. If it is successful, you need not try lower levels. However, if it fails, you have only one egg, meaning that you have to switch to the simplest and annoying way above. This strategy is a little too aggressive.

Then, what is the best method? Actually, I cannot explain it in detail. The answer is written in this book. How to Ace the Brainteaser Interview
(I read this book in Japanese. So, I cannot guarantee that the answer is surely described in the English version.)

By the way, Google have withdrawn Brain Teaser. I guess Apple will hardly rely on this kind of puzzles as well. We can enjoy Brain Teaser as an entertainment, no more in the job interview.

My past entry: Job interview now and then
My past entry: New standard of adoption in Google
My past entry: Hiring interview for Google and me


No comments:

Post a Comment