BlackRock Interview Question

They asked the Happy Number question from leetcode, dont remember the 2nd one