7 Commits

Author SHA1 Message Date
86d333ee94 feat: Test running overhaul, switch to Prettier & reformat everything (#1407)
* chore: Switch to Node 20 + Vitest

* chore: migrate to vitest mock functions

* chore: code style (switch to prettier)

* test: re-enable long-running test

Seems the switch to Node 20 and Vitest has vastly improved the code's and / or the test's runtime!

see #1193

* chore: code style

* chore: fix failing tests

* Updated Documentation in README.md

* Update contribution guidelines to state usage of Prettier

* fix: set prettier printWidth back to 80

* chore: apply updated code style automatically

* fix: set prettier line endings to lf again

* chore: apply updated code style automatically

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2023-10-04 02:38:19 +05:30
268796b0e8 added fibonacci using formula along with test cases (#1358)
* added fibonacci using formula along with test cases

* updated the changes

* added jest's each in test cases

* added jest's each for testing

* returned inline value

* removed redundant comment

* hoisted the variables

* Use shorthand

* considered adding resource of the formula

---------

Co-authored-by: madhuredra <madhuredra.tiwari@zemosolabs.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2023-09-19 20:29:34 +05:30
1b64ba68fa Fibonacci.js overhaul (#1049) 2022-06-27 10:09:54 +05:30
1589263947 fixed some spellings 2021-10-05 12:49:23 +05:30
8b1e32eb77 Add extra testcases for Fibonacci and improve code (#544)
* Add extra testcases for Fibonacci and improve code
* Fix typos in Fibonacci.js
2020-12-20 22:24:02 +05:30
78a05970e2 Add O(log n) algorithm using matrix exponentiation to find n-th fibonacci 2020-10-30 16:02:15 +05:30
e112434dee Add tests to Math (#423)
* Add prettier config

* test: add test to check for absolute function

* chore: es5 to es6

* test: add test to check mean function

* test: add test for sum of digit

* test: add test for factorial

* test: add test for fibonnaci

* test: add test for find HCF

* test: add test for lcm

* test: add gridget test

* test: add test for mean square error

* test: add test for modular binary exponentiation

* test: add tests for palindrome

* test: add test for pascals triangle

* test: add tests for polynomial

* test: add tests for prime check

* test: add tests for reverse polish notation

* test: add tests for sieve of eratosthenes

* test: add tests for pi estimation monte carlo method

* chore: move tests to test folder

* chore: fix standardjs errors
2020-10-12 01:17:49 +05:30