1-Karatsuba-Multiplication

command
v0.0.0-...-93f88a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

Karatsuba Multiplication

Complexity Analysis:

  • Time complexity: O(nlog2 3).
  • Space complexity: O(n).

Programming Assignment #1

In this programming assignment you will implement one or more of the integer multiplication algorithms described in lecture.

To get the most out of this assignment, your program should restrict itself to multiplying only pairs of single-digit numbers. You can implement the grade-school algorithm if you want, but to get the most out of the assignment you'll want to implement recursive integer multiplication and/or Karatsuba's algorithm.

So: what's the product of the following two 64-digit numbers?

Input

The file has two lines, each with a different number. For example:

5
4
Output

The output must be the integer multiplication of the two numbers from the input file. For example:

20

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL