@mohit: a little change in your function to make it work..
int find_cuts(int l,int rope)
int find_cuts(int l,int rope)
{
if(l==rope)
return count;
count++;
// printf("%d",count);
l=l/2;
if(l==rope)
return count;
if(rope>l)
rope =rope-l;
return find_cuts(l,rope);
}
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.