You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Given a number N. The task is to reduce the given number N to 1 in the minimum number of steps. You can perform any one of the below operations in each step.
//Operation 1: If the number is even then you can divide the number by 2.
//Operation 2: If the number is odd then you are allowed to perform either (n+1) or (n-1).