Search
⌘K

Leetcode 202. Happy Number

Determine whether iterating n -> sum of the squares of its digits eventually reaches 1 or falls into a repeating cycle; the core task is to detect cycles in this generated sequence (e.g., via a visited set or Floyd's cycle-finding).

Asked at:

Snowflake


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late February, 2026

Snowflake

Junior

Comments

Your account is free and you can post anonymously if you choose.