When N is 1 and K > 0 , then the single number will be the first and last digit it cannot have difference greater than 0
if ( N == 1 && K == 0 ) { res . push_back ( 0 ) ; } else if ( N == 1 && K > 0 ) { return res ; }