[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Program Discussion :: Hashing

Home > Programs > Hashing

283 / 2

Start from a random number, generate a sequence such that if number is odd multiply it 3 and add 1. If number is even, divide the number by 2. This Sequence will always cyclic with 4, 2, 1. In this sequence, find the maximum power of 2 generated in the sequence and print only the power, not the sequence.

Answer:


Asked In :: Virtusa

Post Your Answer Here: