Things have been busy the last few weeks, and I’m still pulling together a write up for the last challenge. I hope to have something out by the end of this week or beginning of next. In the meantime, how about another challenge? We’ll keep this one easy, since I suspect you’re as busy as me. As a follow-on to last month’s challenge, I want you to create a function, multiplyBig(a,b), where, like the last challenge, a and b are text strings comprised only of integers and, possibly, the negative sign as the first character. The function should treat a and b as very large integers and return their product. The inputs a and b will not necessarily have the same number of digits or have the same sign.
Scoring
- Eight points for a version that can correctly multiply 100 pairs of 100-digit numbers.
- Three additional points to the implementation that can do this the quickest for 100 pairs of 1,000-digit numbers (2 points for second, 1 for third).
- Three additional points for the implementation that can multiply the largest pair of equal length numbers in under 5 seconds (2 for second, 1 for third).
The same numbers will be used to test all entries. You only need to consider using two text string inputs; I will take care of looping over all pairs of numbers when I test the entries. Entries are due by 11:59 pm Eastern US, Wednesday July 15th.
Good luck!