private boolean isAdditiveNumber(BigInteger num1,BigInteger num2,int start,String num){
  if (start == num.length()) {
    return true;
  }
  num2=num2.add(num1);
  num1=num2.subtract(num1);
  String sum=num2.toString();
  return num.startsWith(sum,start) && isAdditiveNumber(num1,num2,start + sum.length(),num);
}

private boolean isAdditiveNumber ( BigInteger num1 , BigInteger num2 , int start , String num ) { if ( start == num . length ( ) ) { return true ; } num2 = num2 . add ( num1 ) ; num1 = num2 . subtract ( num1 ) ; String sum = num2 . toString ( ) ; return num . startsWith ( sum , start ) && isAdditiveNumber ( num1 , num2 , start + sum . length ( ) , num ) ; }
recursion . recurrence relation : isadditivenumber = can find the third number & & rest of the string is also additive . stop when reach the end .
