Function to print the non - palindromic string if it exists , otherwise prints - 1
function findNonPalinString ( s ) { var freq = Array . from ( { length : 26 } , ( _ , i ) => 0 ) ; var flag = 0 ; for ( var i = 0 ; i < s . length ; i ++ ) {