Get Off-Campus Placement Jobs Info !!!
Programs asked in Mettl Coding Round
Click To Practce List of Programs asked in Nagarro !!!

Program Discussion :: Hashing

Home > Programs > Hashing

1 / 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: