Given range of numbers between A and B (A<= B)
Find the number within given range which has more number of iterations as
per the following
n { stop ; return iteration number } if n=1;
n = 3n+1 if n is odd
n = n/2 if n is even
for eg :
n=3 odd
----
n=10;
n=5;
n=16;
n=8;
n=4;
n=2;
n=1;
iterations : 7
--
*
Time complexity= (<n^2)
*************************************************************
*NARESH ,A*
**
--
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.