Function to return the total cost required to make the string Pangram
function pangramCost ( arr , str ) { var cost = 0 ; var occurred = new Array ( 26 ) ; for ( let i = 0 ; i < 26 ; i ++ ) occurred [ i ] = false ;