Given an integer n, return the number of steps to reach 1 following these rules: if n is even, divide by 2; if odd, multiply by 3 and add 1.
Unlock detailed company stats for this questionUpgrade
Community answers
No answers contributed by the community yet.
Related questions
Given a list of integers, return 1 if the integer is a power of 2 and 0 if it is not.Given an array of n integers and a number k, find the maximum number of elements whose sum is less than k, and return their sum.If given two strings, each containing a number larger than 32-bit, how do you add them and return the result as a string?Related courses

Course

Course
Course
