Long multiplication problem, with Java examples

Pierre-Marie Poitevin
6 min readNov 9, 2021

Introduction

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.

--

--