least calculation time to get 1, if n is odd,add or sub 1,if even divide by one.
leastcalculationtimetoget1,ifnisodd,addorsub1,ifevendividebyone.iterationsolution:#include#include#include#includeusingnamespacestd;intfunction(unsignedintn){if(n==1)return0;if((n%2)==0)return1+functi