ignacio-chiazzo / Algorithms-Leetcode-Javascript

Algorithms resolution in Javascript. Leetcode - Geeksforgeeks - Careercup
https://ignacio-chiazzo.github.io/Algorithms-Leetcode-Javascript/
MIT License
608 stars 88 forks source link

Update Happy_Number.js #93

Closed Alucard2169 closed 8 months ago

Alucard2169 commented 8 months ago

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 is 1 and n was 1 then return true else false.

ignacio-chiazzo commented 8 months ago

Thank you @Alucard2169

Alucard2169 commented 8 months ago

No problem.