PDA

View Full Version : Interview



daande
26-01-2010, 02:28 PM
So I just had the hardest interview of my life. It was for the best internship program in canada (for software engineering); about 3000 applicants for 3 spots a year, atleast I made it to the interview. Anyways, I was given problems and asked to code them on the spot. I was given many technical questions that needed to be answered on the spot. It was very hard. I wasn't even allowed to drop my code into a compiler in order to see if it worked. I had to write it out in something similar to notepad. I felt I did decent except for 2 of the verbal technical questions. After the interview I dropped my code I had to write into a compiler and the first function worked but had 2 syntax errors. The second function I had to write worked flawlessly.

Here were the two coding questions:

Question 1:

You are given this:

public static int getLastIndexOf(String s, char c) {

}

And you have to write the code that finds the last index of c within the string s.

Question 2:

Write a function that can take an array of positive integers and a sum. You then need to find the first pair of integers that equal that sum and return them.


Anyways, hopefully I get called into the next interview.