10-18-2005 06:18 AM
10-18-2005 07:22 AM
Hi Salac,
I am not very sure about the speed of the code, but for better speed and optimization, you can do some thing like type conversion. For example in your code while you are indexing the array, you can convert the value from the iterator "i" to double and so on.
I am attaching the code that you have put with minor modifications, hope this helps.
10-18-2005 07:38 AM
10-18-2005 11:23 AM
10-19-2005 02:15 AM
10-19-2005 03:39 AM
10-19-2005 09:44 AM
Now that you know how to write faster code, try the Prime factor coding challenge ! 🙂