Tuesday, November 20, 2007

Neat Questions

From necramirez:

questions sa client (U.S.) interview via phone:

CompSci questions!

1) Given an array of integers of length N, you know that the values are unique and belong to the range 0..N, where one number is missing (0..N is N+1 numbers). Provide a solution to determine the missing number and what is its running time.

2) Given a 2xN grid, provide a solution to determine the number of possible ways to arrange 1x2 tiles to cover the entire grid.

3) Design Problem: You are able to accept different forms of input (XML via Web Service, plain string, XML via HTTP request) and should likewise be able to output in different formats (HTTP Response, Web Service Response, e-mail). Describe how you will set-up the application such that it will be easy to add new forms of input and output.


I will try and solve these later when I have the time. In the meantime, feel free to post your solutions.

No comments:

Post a Comment