If sum of adjacent characters is K mark the starting index and set flag to 1
if ( ( s [ i ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) + s [ i + 1 ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) ) == k && flag == 0 ) { flag = 1 ; start_ind = i ; }