Tuesday, July 7, 2009

Interview Question 1: Design a Tape Reader


Problem 1: Design a tape reading system. The tape contains 2^n - 1 numbers. One number is missing on the tape. Design hardware + software system to read the numbers and find out the missing number.
Assumptions:
- Tape is continuous. Assume that you have enough low level components given to identify and read a number.

Problem 2: The similar problem is posed with 2*n + 1 numbers. 2*n numbers are in pairs. For example
{10,10, 21,21,3} and you need to find out the odd number which is 3 in this example.
The numbers are not in any particular order. For example in the above example the numbers might occur as
{10,3,21,10,21}. The “n” is large.

You will notice that this is an open ended question. The interviewer is not looking for a fixed answer. Rather he is looking for a matured approach which shows how a person thinks and applies his existing knowledge in solving a given problem.


Block diagram of the desired system