javascript-algorithms
javascript-algorithms copied to clipboard
Better `isPowerOfTwo` algos and files
Closes #889.
The bitwise approach isn't mathematically correct, because it only works for 32bit ints, therefore it should be exclusive to the math/bits
directory.
I also added info about the supported input args for both the trial division approach and the bitwise approach
Now the non-bitwise fn supports BigInt
s