|
![](/i/fill.gif) |
On 19/08/2013 10:10 AM, scott wrote:
>> On this day, the applicant came up with this:
>>
>> int abs(int input)
>> {
>> int value = 0;
>> for (int n = input; n != 0; n++)
>> {
>> value++;
>> }
>> return value;
>> }
>
> That's a pretty epic fail.
As I say, the impressive thing is that it's a correct (yet inefficient)
implementation of negate().
> The rest of the interview must have been fun :-)
My boss was particularly amused by the time the guy said he read
something about design patterns, and when we asked which book, he
couldn't remember, but he said it was "the one with the Singleton
pattern in it".
When asked for an example of a design pattern, he fumblingly described
something which sounded exactly like a switch block.
Post a reply to this message
|
![](/i/fill.gif) |