News for hackers. Stuff that matters.
Re:What do the best interviewers have in common? by pkaye on Thursday November 30, 2017 @11:01PM (#15821811)
Should have mentioned that temporaries are allowed. Also you swapped the array elements twice... The terminating condition should be x == y.

Also if you changed this to a int *a (and a count), some people will get confused how to do this all with pointers. Asking how this would be tested is also a good question.

Re:What do the best interviewers have in common? by jaredsohn on Thursday November 30, 2017 @11:56PM (#15822028)
>The terminating condition should be x == y

That assumes an odd number of elements (true in this case but not in general); I would recommend terminating when x >= y.

Re:What do the best interviewers have in common? by 0xfeba on Friday December 01, 2017 @11:51AM (#15825083)
ah, whoops!