Pergunta de entrevista da empresa Bloomberg

Question one : The Collatz Conjecture

Resposta da entrevista

Sigiloso

12 de dez. de 2024

Implement a loop or recursion that tracks the number of steps taken while applying the transformation rules (divide by 2 if even, multiply by 3 and add 1 if odd) until the input reduces to 1. Improve space efficiency for subsequent calls to collatz_conjecture()