3 ms·
I 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
by mrwnmonm 9y ago
I 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.