Java solution using biginteger


  • -6
    D
    public String multiply(String num1, String num2) {
        BigInteger integer1 = new BigInteger(num1);
        BigInteger integer2 = new BigInteger(num2);
        return integer1.multiply(integer2).toString();
    }

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.