News for hackers. Stuff that matters.
Re:Why 37signals Doesn't Hire Programmers Based on Brainteasers by dspeyer on Thursday January 05, 2012 @09:51PM (#3431711)
Factorials risk integer overflow in the intermediate calculations, though something similar can work.
Re:Why 37signals Doesn't Hire Programmers Based on Brainteasers by Bootvis on Friday January 06, 2012 @01:10AM (#3432218)
Yes, it seems a number of optimizations are possible. At least it is not necessary to calculate n!. Depending on the job discussing these strategies and whether they are worthwhile for some real world problem can be quite interesting.