KLA-Tencor

  www.kla-tencor.com
  www.kla-tencor.com

Interview Question

Software Engineer Interview Migdal Ha`Emeq (Israel)

They asked me, based on function int SQRT(int) build

  function float SQRT2(int) that will return square root with three digits after the point.
Answer

Interview Answer

2 Answers

0

Well, since I was already pretty tired, at the begining I started writing something wrong. Then one of the interviewers said, wait, see that you must return three digits exactly after the point, and I said, yes, it means that the result of SQRT should be multiplied by 1000, that is its input should be multiplied by 1M.
Then I wrote:

float SQRT2(int x){
  return (SQRT(x*1000000)/1000.0);
}

Then, one of them explained me why I am right, I even didn't have strengths to say to her that somehow if I wrote it by myself, I do understand it.:)

Finally, she said to me good luck and I felt that it means "Go to..., I are definitely bad personality":)

Well, next time I will be much nicer person:) Good luck to us all !:)

Interview Candidate on 2010-01-11
0

Your answers are really smart. KLA surely missed a good candidate.

Anonynous on 2010-12-07

Add Answers or Comments

To comment on this, Sign In or Sign Up.