<
Ferozeh dot Com



Expert advice on tech interviews !

about ferozeh


Ferozeh !

Read Solved Interview Questions !

Mailshell is a small company based in California and it is apparent from their name that they write software for emails. After the resume screen I received an email from them to complete a programming exercise. This is good exercise in parsing and you can try it for your interview preparation. They also had me fill a long survey which consisted of the usual questions like "what is your weakness?" and three word problems that I also describe here.

Programming Exercise

1) Please download this compressed archive containing email messages:

2) A typical email message contains message headers followed by a blank line followed by the message body. Received headers begin with "Received:" and detail the mail systems that the email was routed through.

3) Please extract the IP addresses from the received headers of the
messages. Please extract domains from the body of the messages.



Note:

- The body of the message is separated from the headers by a blank line.

- Domains appear as part of URLs. For instance, a url looks like:
http://www.domain.com/xyz.html
The domain would be domain.com.

4) Please use PHP, Perl, Python, C, or C++ to complete this exercise. If you decide to use C or C++, please also submit the make file or project file to compile on Linux or Windows.

5) Please send us your code, a list of tools that you used, and the output
file of your program containing the IP addresses and domains found in each message. Please also specify the number of hours that you spent on this
project.

Survey Questions

Here are the survey questions:

  • Suppose that 5% of people of your age and heredity have diabetes. Suppose that a blood test has been developed that correctly gives a positive test result in 80% of people with diabetes, and gives a false positive in 20% of the cases of people without diabetes. Suppose you take the test, and it is positive. What is the probability that you actually have diabetes, given the positive test result?
  • You are planning to tour a country, and you wish to visit several of cities G, H, I, J, K, L, M, N, and O with the following restrictions: You cannot visit K and L in one tour. You cannot visit J, M, and O in one tour. You cannot visit I, M, and N in one tour. You cannot visit G and M in one tour. Referring to the information above, which one of the following groups of cities can all be visited in one tour?
  • Six people, P, Q, R, S, T, and U, compete in a series of races. U never finishes first or last. R never finishes immediately behind either P or Q. R always finishes immediately ahead of S. Referring to the above information, if in an acceptable finish, R finishes second, which one of the following must be true?

    read answer here