Worked with solution for collatz sequence problem