it is sort of confusing... do you really consider it a hard problem? I am first year maths student at Uni Warsaw and we literally had this problem in the first month, and solution was found by most people in just a few minutes. It sometimes amazes me how people here at HN find some hard for me problems easy and vice versa
camus2|12 years ago
But that's a very good exercice.
> I am first year maths student at Uni Warsaw
then Math is your major discipline. Please write down how you would express the solution in a pure mathematical form.
mike_mg|12 years ago
I guess expressing it mathematically purely is already done in the code of the original solution, because in a way program == proof. If you have some time, here's a great read on this: http://www.maa.org/sites/default/files/pdf/upload_library/22...
davidp|12 years ago
Bear in mind that the objective isn't to weed out people who can't solve it. There are plenty of people who are fine coders who wouldn't quickly hit the solution for any number of reasons, including nervousness. The objective is to weed out the charlatans and amateurs who managed to get past the HR resume filter, so that as little time as possible is wasted.
JoeAltmaier|12 years ago
mnbvcxza|12 years ago
mike_mg|12 years ago