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
1
u/grimskin May 12 '15
Here's what I've meant.
Think about combination of operands and spaces like the 8-digit number in number system based on 3. You'll just need a routine that evaluates f(combinationNumber, [1..9]) and a cycle that walks combinationNumber from 00000000 to 22222222 calculating f() on each iteration, thats all and no need to keep graph with ~30k nodes in memory.
p.s. sorry for my crappy English, it's my second language, but I hope you'll understand what I mean.