Minimum number of letters needed to make a total of n | Function to return the minimum letters required to make a total of n ; Driver code
function minLettersNeeded ( n ) { if ( n % 26 == 0 ) return parseInt ( n / 26 ) ; else return ( parseInt ( n / 26 ) + 1 ) ; } var n = 52 ; document . write ( minLettersNeeded ( n ) ) ;