Question d’entretien chez Bloomberg

Question one : The Collatz Conjecture

Réponse à la question d'entretien

Utilisateur anonyme

12 déc. 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()