pushing right adjacent element for index ' k '
if ( k + 1 <= s . length - 1 && ! edge [ s [ k ] . charCodeAt ( 0 ) - 97 ] [ s [ k + 1 ] . charCodeAt ( 0 ) - 97 ] ) gr [ s [ k ] . charCodeAt ( 0 ) - 97 ] . push ( s [ k + 1 ] . charCodeAt ( 0 ) - 97 ) , edge [ s [ k ] . charCodeAt ( 0 ) - 97 ] [ s [ k + 1 ] . charCodeAt ( 0 ) - 97 ] = 1 ; }