Automated Traders Desk Interview Question
Software Engineer / DevelopersAsians interviewers are either passive easy filters or arrogantly aggressive aholes. I'm asian too btw. It's probably in the culture for us to be blunt and critical of things (unless they are abcs).. esp in Hong Kong (British style aholes). Anyways if you want a taste of their interview style and attitude..check out bloomturd on here and on the web.
Is the question wrong, the sum between 0 to 10 is -15?
Anyway, the recursive solution does not provide any benenfit on this problem. Recursive call just waste stack and clock cycle to push and pop.
unsigned int sum (unsigned int number)
{
return number?(number + sum(number-1)):0;
}
If this is what they want.
Is the question wrong, the sum between 0 to 10 is -15?
Anyway, the recursive solution does not provide any benenfit on this problem. Recursive call just waste stack and clock cycle to push and pop.
unsigned int sum (unsigned int number)
{
return number?(number + sum(number-1)):0;
}
If this is what they want.
My advice/experience
- The Hercules April 04, 20081) Don't go there ! Its not worth $80K per anum (of course bonus)
2) Watch out for 2-3 Asian interviewers. They are f****** a$$holes. They will start yawning, start stratching their head if you give wrong answer, pass sarcastic smiles & completly change the course of interview.
For this question they grilled me on conversion of char* to integer. I used atoi & they discussed why not cin<< operators & how istream works