◻️202. Happy Number (easy)
Input: n = 19
Output: true
Explanation:
12 + 92 = 82
82 + 22 = 68
62 + 82 = 100
12 + 02 + 02 = 1Input: n = 2
Output: falseSolutions
Normal - Linked List 2 Pointers
Optimised - HashSet
Last updated