Pregunta de entrevista de Bloomberg

Question one : The Collatz Conjecture

Respuesta de la entrevista

Anónimo

12 dic 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()