Long multiplication problem, with Java examples


The long multiplication is a computational problem in which we want to multiply 2 very large integers, that potentially have hundreds or thousands of digits. This is a problem because such numbers cannot usually be represented as int in traditional computer languages, and we need to store them as strings and we cannot use ‘*’ to get the result of the multiplication.

There are sometimes libraries for such large integers like BigInteger in Java, but we are assuming that for this exercise we cannot use it.




Likes to code and to learn.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

4 Management Strategies to Turn Around Any Software Development Project

The state of the bot: July

Donating Code | Giving Back to Society

University of Indonesia’s Computer Science Students Help Mekari Develop Talenta Kiosk

Mekari’s Product team and Fasilkom UI students

The 10 commandments of serverless

Google Summer of Code 2018 | Final Report | Scrapinghub | PSF

10 free stock photos you would actually use (Monday 16th 08AM edition)

Managing User Identities on Big Data Clusters

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pierre-Marie Poitevin

Pierre-Marie Poitevin

Likes to code and to learn.

More from Medium

Leetcode 189: Rotate Array With Java solution

Understanding Synchronization in Java

People lying on grass making a star shape with their bodies

Java Multithreading, Concurrency, and Parallelism — Part 15

Java program for printing sequence using 3 threads