Collatz Conjecture - Maximum Steps takes to transform (1, N) to from 1 | Algorithms
Objective: Given a number N, write an algorithm to find the maximum number of steps it takes to transform (1, N) to 1 using Collatz Conjecture. The Collatz conjecture is a conjecture in mathematics which states that no matter what value of Positive Number N, If the below sequence is followed then the sequence will always reach 1. If N is even, then do N = N/2 If N is odd then do N = 3*N+1 If N is 1 then stop else keep performing step 1 and step 2.
Post to Tumblr