Interview Riddles

Interview riddles are famous questions asked during interviews by some big companies like Google, Microsoft, Intel etc.

500 Men in an Array

500 men are arranged in an array of 10 rows and 50 columns according to their heights. Tallest among each row of all are asked to come out. And the shortest among them is A. Similarly after resuming them to their original positions, the shortest among each column are asked to come out. And the tallest among them is B.

Now who is taller, A or B?

Riddle Answer

Blind Bartender’s Problem

Four glasses are placed on the corners of a square Lazy Susan (turntable). Some of the glasses are upright (up) and some upside-down (down).

A blindfolded person is seated next to the Lazy Susan and is required to re-arrange the glasses so that they are all up or all down, either arrangement being acceptable.

The glasses may be re-arranged in turns subject to the following rules.

  1. Any two glasses may be inspected in one turn and after feeling their orientation the person may reverse the orientation of either, neither or both glasses.
  2. After each turn the Lazy Susan is rotated through a random angle.
  3. At any point of time if all four glasses are of the same orientation, a bell will ring.

Can you devise an algorithm which allows the blindfolded person to ensure that all glasses have the same orientation (either up or down) in a finite number of turns? The algorithm must not depend on luck.

Riddle Answer

Natives and Visitors

In an Island the natives lie and visitors speak truth. A man wants to know whether a salesman beside him in a bar is a native or a visitor.

He asked him to ask a woman beside him whether she is a native or visitor. He replied, “She says she is a visitor.” Then he was immediately able to determine if the salesman is a native or a visitor. Is the salesman a native or a visitor?

Riddle Answer