View Single Post
Old 2008-04-27, 20:28   #10
Brian-E's Avatar
Jul 2007
The Netherlands

7×467 Posts

Originally Posted by henryzz View Post
i have programed this
unfortunatly it only takes off a fifth of the time
are there any more suggestion?
My guess is that a lot depends on how you implement the check of whether a number has been seen before. Obviously there are simple but very inefficient ways of doing this - and the most inefficient would take much more time than just following the chain to the end without the check. It's a non-trivial problem but I think if you try to optimize your method of checking for previous occurence you might dramatically improve the speed.

Last fiddled with by Brian-E on 2008-04-27 at 20:29
Brian-E is offline   Reply With Quote