If I understand your algorithm correctly, it seems O(n^2)
where n
is the number of digits.
Have you looked at Karatsuba Algorithm?
It speeds up multiplication using the divide and conquer approach. It may be worth taking a look at.
If I understand your algorithm correctly, it seems O(n^2)
where n
is the number of digits.
Have you looked at Karatsuba Algorithm?
It speeds up multiplication using the divide and conquer approach. It may be worth taking a look at.