Minimum operations of the given type required to make a complete graph | Function to return the minimum number of steps required ; Driver Code
function minOperations ( N ) { var x = Math . log ( N ) / Math . log ( 2 ) ; var ans = parseInt ( ( Math . ceil ( x ) ) ) ; return ans ; } var N = 10 ; document . write ( minOperations ( N ) ) ;