To view parent comment, click here.
To read all comments associated with this story, please click here.
When the HR manager receives a request to hire some smart people to do programming and that HR manager doesn't know how to find them. He/she will rip off some tough IQ questions from somewhere and request the candidates to answer them. This kind of tough test show that the company have no idea what kind of candidates they are looking for.
Recently, my company want to open a factory in Philippines and want to hire three Filipino Java Programmers. My company get about 3000 applicants for the three vacancy.
However, the HR manager doesn't know how to set the test to filter away the unsuitable candidates.
Fortunately, he is humble enough to ask me for help and I prepare 20 questions for him to test their Java knowledge.
I also prepare a simple Java program with errors for the candidates to test their debugging skills.
The right candidate must have knowledge, skills and good attitude. Their attitude can only be tested during their probation.
The test was given in Delphi (pascal), and the solution
involved using a combination of pointers and something else I can't remember right now.(this was back in 2006)
You couldn't just reverse the string in the obvious way because the compiler would allocate additional memory to do the swaps. I will see if I can find the link to the article that shows what the real solution for it is.
In the real world with today's systems, does anyone really care if you use a extra byte to reverse a string?
What's more important is that you free your resources when using a non garbage collected language.




Member since:
2011-01-28
snorkel2,
"I won't go to interviews where they give you a test with no prior warning, those are freaking ridiculous."
Logically speaking, they would be impossible to avoid.
"I went to this one interview and they wanted me to write a program on the spot that could reverse a string without using any additional memory than the string originally used."
Isn't it simple enough to use two iterators and swapping the characters? But if your going to an interview to do databases, guis, web development, etc then yea the problem doesn't reflect the job.
The majority of these questions do a terrible job defining border conditions while looking for something specific. One interview I was asked about what was needed for recursion to work. I replied that a stack being needed, the ability to push the current address to the stack and continuing to execute at a new address, and then the ability to returning to old address on the stack. The interviewer was looking for "an exit condition". So although I could obviously implement a recursive function in my sleep, he thought I failed the question. A far better test would have been to have me write a recursive function on paper.