Closed Alucard2169 closed 8 months ago
7 Is also considered a Happy number, previously the code was checking if the array length is 1 and n was 1 then return true else false.
7
1
n
true
false
Thank you @Alucard2169
No problem.
Added base case check for Happy number problem.
About the fix.
7
Is also considered a Happy number, previously the code was checking if the array length is1
andn
was1
then returntrue
elsefalse
.