4 ms·
> Can you work out how to do it? Yes. > Do you find this interesting? Yes! I found it interesting because at first it seems like the solution space ought to
by matheist 8y ago
> Can you work out how to do it?
Yes.
> Do you find this interesting?
Yes! I found it interesting because at first it seems like the solution space ought to be many-to-one, not one-to-one, and it's not immediately clear why the condition that k is larger than the coefficients is the "right" condition to fix that. I had to work through some examples to see the trick of it.
hints (rot13):
1. jungunccrafvslbhpubbfrxrdhnyfgjb
2. jungunccrafvslbhpubbfrxrdhnyfgra
solution: jevgrcxvaonfrx
- ColinWright 8y agoExcellent - pleased you liked it. Here on HN we seem to be in a minority. And your answer is one of the two techniques I've got - nice one.
- quickthrower2 8y agovyvxrgbrknttrengr:jungunccrafvslbhpubbfrxrdhnyfbarzvyyvbanaqgurpbrssvpvragfneryrffgunagra
- ColinWright 8y agoThe simplest answer is for you to try it and see what happens. Nothing goes wrong, and it just makes the solution/technique more obvious.
- quickthrower2 8y agoThanks! I was just saying how I arrived at the answer, how my mind works, which I think is what the OP was looking to see - how people solve a problem like this. Hope this comes up in my next whiteboard interview :-)
- ColinWright 8y agoOh, OK, that wasn't obvious to me, but now is - thanks for the clarification, and for the answer. Interesting. Your technique, by the way, is a classic puzzle solving technique that I've used successfully many times, sometimes to great effect. Nice one.