Minimum number of coins that can generate all the values in the given range | Function to find minimum number of coins ; Driver code
function findCount ( n ) { return parseInt ( Math . log ( n ) / Math . log ( 2 ) , 10 ) + 1 ; } let N = 10 ; document . write ( findCount ( N ) ) ;