3 ms·
What makes you think the other candidates didn't simply program a search? Given that you know it's possible silly to do a search, why did you not do that? Out
by ColinWright 9y ago
What makes you think the other candidates didn't simply program a search? Given that you know it's possible silly to do a search, why did you not do that?
Out do you mean search for the solutions on the web? Ok, now I don't know what you mean.
It seems easy enough to write a program that just searches for the solution. I guess my question is: why didn't you write a program to solve the problem?
Maybe I'm just missing something - it's very late here, and I'm tired. I'll look again at your comment and the link tomorrow.
- mrwnmonm 9y agoI tried to solve it, but i felt it needs some kind of Math knowledge. any attempt to solve it without that knowledge, just produce a stupid solution. you could see here https://www.hackerrank.com/challenges/a-very-special-multiple https://www.hackerrank.com/challenges/a-very-special-multipl... that it is categorized under Number Theory. The point is, i love math, if i was asked to deal with a project that require math knowledge, and i was given some time, i would be happy to learn the theory, and i am pretty sure that i will. So this kind of tests, just check if i have that knowledge right now or not, not if i am able to acquire it or not, and they didn't mention anything about it in the job description, it got me crazy, and i even regret the time i spend applying for the position.
- ColinWright 9y agoOK, I've looked more at it, and while it might be classed as being under Number Theory it really is just looking at the question of divisibility. You're given X, you need to find a Z of a particular form (one or more 4's followed by zero or more 0's) such that Z is divisible by X. It looks plausible to do small examples by a brute-force search, but having done that you start to see a pattern in the larger solutions, and realise that you need to look at prime factors. That lets you know what you then have to research to find how to do this. Note: I may yet be missing something - I haven't gone on to code up a complete solution. But maybe your potential employer felt that exploring things like this, spotting patterns, starting to explore the underlying principles, researching the relevant underlying theory, and then coding up what you find is the kind of thing you'd have to do in the job. Maybe it's not a case of having learned how to do stuff and then apply it over and over, but the willingness to hunt for solutions in situations you haven't met before. But at the end of the day, if they are the kind of company to reject you for reasons you think are unfair and unreasonable, do you really want to work for them? Maybe you're well out of it.
- detaro 9y agoI think OP meant searching for a solution on e.g. github and stealing it, not programming a simple search algorithm, which doesn't have a chance of succeeding for non-trivial examples. If you don't think of the trick to avoid actually dealing with numbers with tens of thousands of digits you're stranded, which is pretty much a maths problem. The coding pieces are comparatively trivial.