Big numbers

I have just got an assignment about multiplying two big numbers using double linked list, although i try very hard but i can't find the best algorithm using linked list to code it,
Can somebody give me code or any idea to multiply two big numbers (as fast as possible) but just only using double linked list.
Last edited on
I assume you express the big number as a sequence of digits (it hasn't have to be decimal digits from 0 to 9, but nothing speaks against decimal digits either. It's most probably easier to debug with decimals).

Then you can use the good old elementary-school algorithm where with the numbers below each other and multiplying one digit with the whole other number's digits step by step and finally sum all together. Here's a nice simulation of the algorithm: http://www.klever.net/spilikin/arithmetikin/multiply

You may need some additional data structures to hold intermediate values.

Ciao, Imi.
Topic archived. No new replies allowed.