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 May, 2026

Snowflake

Mid-level

Mid April, 2026

Snowflake

Mid-level

Early April, 2026

Snowflake

Junior

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