I would like to optmise multiplication ,please help

krishna kumar.s

Greenhorn

Posts: 22

posted 4 years ago

0

To solve one of the puzzles I need to find the multiplication of a number which yields <2 .I used below code which takes 8hrs adn does go upto 10000, can anybody suggest a better efficient method for multiplication?

Ulf Dittmer

Rancher

Posts: 42966

73

posted 4 years ago

3

I'm not sure what the algorithm is supposed to do, but you're much better off handling large integers by using the java.math.BigInteger class than by using strings.

Don't get me started about those stupid light bulbs.