mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-27 07:12:11 +08:00

* docs: update js doc * feat: add number type validation condition * pref: Optimize space complexity remove the Array from the algo and used two flag varible to calculate last two numbers & optimize the sapce complexity O(n) to O(1) * test: add test case for invalid types