Bloomberg Interview Question

Asked to code Collatz Conjecture