Philaland Coin | TCS Mockvita 2020 | C ++ implementation to find the minimum number of denominations required for any number ; Function to find the minimum number of denomminations required ; Driver Code ; Function Call
#include <bits/stdc++.h> NEW_LINE using namespace std ; int findMinDenomin ( int n ) { return log2 ( n ) + 1 ; } int main ( ) { int n = 10 ; cout << findMinDenomin ( n ) ; return 0 ; }