Commit Graph

208 Commits

Author SHA1 Message Date
cole
d099d8ee60 feat: add euclidean algorithm implementation of gcd 2019-12-28 01:10:53 -05:00
Bahadir Altun
79d50738f2 Add fast power (#691)
* Add fast power

Computes a^b in O(logN) time.

* Change long long to int64_t

* Update fast_power.cpp

* Update fast_power.cpp

* Add tests

* Update sample tests

* Update rand function

* Remove extra-spaces
2019-12-26 09:30:30 +01:00
Ajay Singh
4194b204f6 Prime (#585)
* Prime

Here we can check prime upto 10^8 in O(1). It is very useful in Competitive programming.

* Update and rename Math/Primeupto10^8.cpp to math/primes_up_to_10^8.cpp

* long long -> int64

* cstdint::int64_t

* int64_t

* std::cin
2019-12-07 08:33:23 +01:00
Akshay Gupta
bc8e8dfc2b factorial.cpp (#561)
* Create factorial.cpp

* Update and rename Math/factorial.cpp to math/factorial.cpp

* Update factorial.cpp

* Update factorial.cpp
2019-12-05 23:02:52 +01:00
Shrikar17
525cafea94 Added factorisation technique (#604)
* Added factorisation technique

* Update and rename Math/hcf.txt to math/greatest_common_divisor.cpp

* Update greatest_common_divisor.cpp
2019-12-04 09:24:48 +01:00
5ur3
0ce3226f00 Create PrimeNumbers.cpp (#607)
* Create PrimeNumbers.cpp

* Rename Math/PrimeNumbers/PrimeNumbers.cpp to math/prime_numbers.cpp

* Trailing whitespace, std::cin, std::cout, std::endl

* std::vector

* std::vector again
2019-12-04 09:05:08 +01:00
Christian Clauss
86f0bc936d
Flatten the math directory (#657) 2019-11-28 14:34:13 +01:00
Christian Clauss
3fc7de16c0
rename Math -> math (#651) 2019-11-28 13:31:18 +01:00