Bloomberg Interview Question

usual hacker rank coding question s