in if block for checking digit not to be 0 or 1
if(digit==0 || digit==1){
dialpad(input,output,i+1,j);
}
[as given in video]
but there should be return statement also otherwise for same digit code will run twice
it should be like this
if(digit==0 || digit==1){
dialpad(input,output,i+1,j);
return;
}