text: Minimize number of cuts required to break N length stick into N unit length sticks | C # program to find minimum time required to split a stick of N length into unit pieces ; Function to return the minimum time required to split stick of N into length into unit pieces ; Return the minimum unit of time required ; Driver Code
code: using System ; class GFG { static int min_time_to_cut ( int N ) { if ( N == 0 ) return 0 ; return ( int ) Math . Ceiling ( Math . Log ( N ) / Math . Log ( 2 ) ) ; } public static void Main ( ) { int N = 100 ; Console . Write ( min_time_to_cut ( N ) ) ; } }