Commonly asked puzzles in analytics interviews

Tavish Srivastava Last Updated : 26 Jul, 2020
5 min read

Introduction10579563003_52003abedd_o

The earlier you land up to the industry which interests you, the better it is for your carrer. I landed up into analytics industry by chance. When I joined my first firm, I was aware what analytics means, but did not really know how big is the opportunity to grow in this industry. Now, I know that things happened for the best (although by chance). Analytics industry relies on extensive use of statistics and Data handling tools. But, these skills are really not expected from freshers moving into this domain. Hence, it becomes really difficult for the employers to conclude if a candidate will do well in the industry or not. Primarily what they are interested in is the number crunching skills and the structured thinking capabilities.

To gauge these skills, employer generally use any of the following three types of questions :

1. Puzzles
2. Business Case study
3. Guess estimate

There are hundreds of questions on this topic and tips to crack them in the ‘Ace Data Science Interviews‘ course. It’s a great place to understand the different aspects that go into cracking these interviews and set yourself up for success!

We have published a number of articles on the approaches to take in solving Business Case study and Guess estimate problems. However, we have still not covered the first category of questions i.e. Puzzles. Puzzles are not the ideal way to judge analytical skills because you will be able to solve the question, if you already know it. Solving from scratch is the tougher bit.

Because there are a limited number / type of puzzles which are in use, knowing / practicing them before hand can really become your strength in analytics interviews. In this article, we will solve three widely asked puzzle questions in these interviews.

 

Take the Test: Should I become a Data Scientist?

 

Puzzle 1

[stextbox id=”grey”]

Two trains X and Y (80 km from each other) are running towards each other on the same track with a speed of 40km/hr. A bird starts from the train X and travels towards train Y with constant speed of 100km/hr. Once it reaches train Y, it turns and starts moving toward train X. It does this till the two trains collides with each other. Find the total distance traveled by the bird?

[/stextbox]

Maximum time to solve the puzzle : 1 Minutes

Difficulty level of the puzzle : Low

What is the interviewer looking for : Your approach. If you start calculating distance from X to Y and the Y to X and so on, you have already been rejected.

Solution : Velocity of approach for the two trains = (40 + 40) km/hr

Total time the trains will take to collide = 80km/80km/hr = 1 hour

Total distance travelled by the bird = 100km/hr * 1hr = 100 km.

 

Must Read: The definitive guide to prepare for analytics interviews

 

Puzzle 2

flask

[stextbox id=”grey”]

You have two beakers – one of 4 liters and other of 5 liters. You are expected to pour exactly 7 liters in a bucket. How will you complete the task?

[/stextbox]

Maximum time to solve the puzzle : 2 Minutes

Difficulty level of the puzzle : Medium

What is the interviewer looking for : Answer.

Solution :

Step 1 : Fill in 5 liter beaker and empty it in the 4 liter beaker. You are left with 1 liter in the 5 liter beaker. Pour this 1 liter in the bucket.

Step 2 : Repeat step 1 and you will have 2 liters in the bucket.

Step 3 : Fill in the 5 liter beaker and add to the bucket.You now have 7 liters in the bucket.

 

Must Read: How freshers can crack interviews for business analytics roles?

Puzzle 3:

pirates

[stextbox id=”grey”]

There are 5 pirates in a ship. Pirates have hierarchy C1, C2, C3, C4 and C5.C1 designation is the highest and C5 is the lowest. These pirates have three characteristics : a. Every pirate is so greedy that he can even take lives to make more money.  b. Every pirate desperately wants to stay alive. c. They are all very intelligent.

There are total 100 gold coins on the ship. The person with the highest designation on the deck is expected to make the distribution. If the majority on the deck does not agree to the distribution proposed, the highest designation pirate will be thrown out of the ship (or simply killed). Only the person with the highest designation can be killed at any moment. What is the right distribution of the coins proposed by the captain so that he is not killed and does make maximum amount?

[/stextbox]

Maximum time to solve the puzzle : 15 Minutes

Difficulty level of the puzzle : High

What is the interviewer looking for : Your approach and solution structure.

Solution : The  solution of this problem lies in thinking through what will happen if all the pirates were thrown one by one and then thinking in reverse order.

Let us name pirates as A,B,C,D and E in hierarchy (A being highest).

If only D and E are left at end, D will simply give 0 coins to E and still escape because majority cannot be reached. Hence, even if E gets 1 coin he will give his vote to the distributor.

If C, D and E are there on the deck, C will simply give one coin to E to get his vote. And D  simply gets nothing. Hence, even if D gets 1 coin he will give his vote to the distributor.

If B,C,D and E are there on the deck, B will simply give one coin to D to get his vote. C & E simply gets nothing.

If A,B,C,D and E are there on the deck, A simply gives 1 coin each to C and E to get their votes.

Hence, in the final solution A gets 98 coins and only C & E get 1 coin each.

 

Must Read: All you need to know to start a career in business analytics.

 

End Notes

If you were able to solve all the 3 puzzles, (from scratch) you have a good hunch for such puzzles. In case you were not able to crack the last one, you simply need to practice more. In case you were not able to crack two of the puzzles within time limits, you need to solve different variety of puzzles to get a nag of these types of questions. Puzzles are good way to exercise your brain. We will publish more such puzzles in future, so stay tuned.

 

Did you find the article useful? How many questions were you able to solve? How much time did you take to solve each? What do you think of the difficulty level of these puzzles?

If you like what you just read & want to continue your analytics learningsubscribe to our emailsfollow us on twitter or like our facebook page.

Tavish Srivastava, co-founder and Chief Strategy Officer of Analytics Vidhya, is an IIT Madras graduate and a passionate data-science professional with 8+ years of diverse experience in markets including the US, India and Singapore, domains including Digital Acquisitions, Customer Servicing and Customer Management, and industry including Retail Banking, Credit Cards and Insurance. He is fascinated by the idea of artificial intelligence inspired by human intelligence and enjoys every discussion, theory or even movie related to this idea.

Responses From Readers

Clear

Dinesh
Dinesh

Hi Tavish, Does these questions or puzzle not for entry level or exp below 1-2 year. Because people from more exp will not judge by puzzles. Thanks ! Dinesh K...

Deval
Deval

Hi Tavish, I sincerely want to thank Analytics Vidhya team for such useful articles related to Analytics. Keep posting. I have another approach for puzzle 2 that we can consider as alternative approach. Kindly have a look at it. Step 1: Fill the 5 liter of beaker with 4 liter of beaker . So 1 liter is still remaining in 5 Liter of beaker. Step 2: Fill again remaining 1 liter in 5 Liter of beaker using 4 Liter of beaker. So now you have 3 liter water is remained in 4 Liter of beaker. Pour it in bucket. Step 3: Fill the 4 Liter of Beaker and pour it in the bucket..SO YOU HAVE NOW 7 LITERS IN A BUCKET. Thanks,

Apurv Rohiwal
Apurv Rohiwal

Deval Bhai tumne muzze thoda confuse kar diyaa. step 2 i did not understand. my solution is this... Step 1: Fill 4 liter beaker. empty in bucket. Step 2: Repeat Step 1, two more times Step 3: Using 5 liter beaker remove 5 liters from the bucket

Congratulations, You Did It!
Well Done on Completing Your Learning Journey. Stay curious and keep exploring!

We use cookies essential for this site to function well. Please click to help us improve its usefulness with additional cookies. Learn about our use of cookies in our Privacy Policy & Cookies Policy.

Show details