some benchmark about generating the table for the un-ottimized algorithm 
posted previously. (the very last step, retrieve the best solution 
requires no time)

all the test on the forum is solved in 0.x sec.


make_change( 3**1_000+2, (1..1_000).map{ |n| 3**n } )
15 sec. ---------------- (nil)

make_change( 1_000_000_000_000_000_000_000_000_000_000_000, [43, 4321, 
1234, 31423242, 2, 3432, 545, 5654, 667, 67, 4756, 4657465756, 3443243, 
323123, 421455367, 76879, 8679886, 6, 2, 1, 6, 87, 5, 9, 76, 67])
40 sec. -----------------(183071 candidate solutions)
-- 
Posted via http://www.ruby-forum.com/.