Minimum number of coins that can generate all the values in the given range | Java program to find minimum number of coins ; Function to find minimum number of coins ; Driver code
class GFG { static int findCount ( int n ) { return ( int ) ( Math . log ( n ) / Math . log ( 2 ) ) + 1 ; } public static void main ( String [ ] args ) { int N = 10 ; System . out . println ( findCount ( N ) ) ; } }