r/programming • u/svpino • May 08 '15
Five programming problems every Software Engineer should be able to solve in less than 1 hour
https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour
2.5k
Upvotes
2
u/msx May 08 '15
great job, even if i think that "eval" is kind of a shortcut. I think the evaluation code was intended to be part of the exercise. I'm also surprised that a function like repeated_permutation is available by default O_o Kudos to ruby for having such usefult methods.
I did it in java8, i cheated with the eval too by passing it to a ScriptEngine :P It took 30 minutes, it's much less pretty than your solution and also slow.