Bloomberg interview question

Asked to code Collatz Conjecture