Stressed 17a532637a feat: add Iterative Factorial (#2453) 2 months ago
..
CMakeLists.txt aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
README.md aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
aliquot_sum.cpp 2fd530cba1 [fix/docs]: fit `armstrong_number.cpp` to guidelines (#2457) 3 months ago
approximate_pi.cpp aaf84ab08f fix: fit `approximate_pi.cpp` to guidelines (#2499) 2 months ago
area.cpp b3a0070a74 feat: Reworked/updated sorting/selection_sort.cpp. (#1613) 1 year ago
armstrong_number.cpp e3f0551f98 [fix/docs]: fit `check_amicable_pair.cpp` to guidelines (#2465) 3 months ago
binary_exponent.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
binomial_calculate.cpp 0b890fd842 feat: add program to calculate binomial coefficients (#1448) 2 years ago
check_amicable_pair.cpp e3f0551f98 [fix/docs]: fit `check_amicable_pair.cpp` to guidelines (#2465) 3 months ago
check_factorial.cpp 2d492834b1 feat: update CMake version to 3.26.4 (#2486) 3 months ago
check_prime.cpp 2d492834b1 feat: update CMake version to 3.26.4 (#2486) 3 months ago
complex_numbers.cpp 5baf1ad89f formatting source-code for 247301c5b5f1c61c015fd2f852832651dc443c2e 3 years ago
double_factorial.cpp b1620ff2f5 formatting source-code for e1b1c71e7cca268c9fbad41d2d6b315ff63b9756 3 years ago
eratosthenes.cpp 1d2c5d9d97 feat: add Sieve of Eratosthenes (originally by @thechubbypanda) (#2442) 6 months ago
eulers_totient_function.cpp 4b740d464c fix: fit euler's totient to the contribution guidelines (#2447) 5 months ago
extended_euclid_algorithm.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
factorial.cpp 37aae7ced4 docs: fit `factorial.cpp` to contribution guidelines (#2487) 2 months ago
fast_power.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
fibonacci.cpp 2882b7bec2 fix: math/fibonacci linter warnings. (#1047) 3 years ago
fibonacci_fast.cpp 4c6b3b86c1 formatting source-code for c7ff9d66f1e7c18b43e51d183f1299b25293ac55 3 years ago
fibonacci_large.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
fibonacci_matrix_exponentiation.cpp f222acde97 Nth fibonacci number using matrix exponentiation (#1215) 2 years ago
fibonacci_sum.cpp 67e26cfbae feat: Add ncr mod p code (#1325) 2 years ago
finding_number_of_digits_in_a_number.cpp fddbf08f5a feat: added log code for counting digits (#2234) 5 months ago
gcd_iterative_euclidean.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
gcd_of_n_numbers.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
gcd_recursive_euclidean.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
integral_approximation.cpp a41b707919 feat: added integral approximation algorithm (#1485) 2 years ago
integral_approximation2.cpp b3a0070a74 feat: Reworked/updated sorting/selection_sort.cpp. (#1613) 1 year ago
inv_sqrt.cpp f7d656cb17 feat: Add inverse inverse root functions (#1570) 2 years ago
iterative_factorial.cpp 17a532637a feat: add Iterative Factorial (#2453) 2 months ago
large_factorial.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
large_number.h 8736dce71a make multiplication 64-bit 3 years ago
largest_power.cpp de99092144 feat: largest_power (#1406) 2 years ago
lcm_sum.cpp 67e26cfbae feat: Add ncr mod p code (#1325) 2 years ago
least_common_multiple.cpp d58954523f fix: Integer overflow of least_common_multiple. (#970) 3 years ago
linear_recurrence_matrix.cpp 73ff948b0d feat: Solving linear recurrence using Matrix Exponentiation (with examples). (#1463) 2 years ago
magic_number.cpp 806f3251ee Update math/magic_number.cpp 2 years ago
miller_rabin.cpp bbe1ff1286 formatting source-code for a48d05fb6223cedde57fa487fb79ee51651d5985 3 years ago
modular_division.cpp a4f830b90b clang-format and clang-tidy fixes for 7293e15a 2 years ago
modular_exponentiation.cpp fee3a74e35 feat: Add modular_exponentiation.cpp (#1276) 2 years ago
modular_inverse_fermat_little_theorem.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
modular_inverse_simple.cpp 274cab6914 feat: add modular_inverse_simple (#1937) 1 year ago
n_bonacci.cpp 33750ec1f8 fix: cover the cases `n == 0` and `m < n` in `N_bonacci` (#2468) 4 months ago
n_choose_r.cpp 67e26cfbae feat: Add ncr mod p code (#1325) 2 years ago
ncr_modulo_p.cpp 67e26cfbae feat: Add ncr mod p code (#1325) 2 years ago
number_of_positive_divisors.cpp dcf5fa4241 fix, test: simplification and tests for number_of_positive_divisors (#975) 3 years ago
perimeter.cpp c1a9019d2a feat: add perimeter.cpp (#1897) 1 year ago
power_for_huge_numbers.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
power_of_two.cpp 0f5b36d437 fix: power_of_two algorithm redundant conditional 'else' (#1936) 1 year ago
prime_factorization.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
prime_numbers.cpp 1f6c39bcf2 fix: rewrite prime numbers using linear sieve (#1810) 1 year ago
primes_up_to_billion.cpp 2aec4efdd3 fix: integer overflow due to multiplication fixed (#886) 3 years ago
quadratic_equations_complex_numbers.cpp a0227012ec feat: add Quadratic equations complex numbers (#2451) 5 months ago
realtime_stats.cpp 0356a9cdf3 fix: Various LGTM fixes 3 years ago
sieve_of_eratosthenes.cpp 42e1246ffc fix, test: Refactor of sieve_of_eratosthenes (#969) 3 years ago
sqrt_double.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
string_fibonacci.cpp aaa08b0150 Major rework to improve code quality and add automation checks (#805) 3 years ago
sum_of_binomial_coefficient.cpp 67e26cfbae feat: Add ncr mod p code (#1325) 2 years ago
sum_of_digits.cpp c563fc6694 formatting source-code for 9bc80876e81aeb73c9490417f19cc1d91e60e0d1 3 years ago
vector_cross_product.cpp f4423503a1 cross product of two vectors (#1292) 2 years ago
volume.cpp 050c99eb0a feat: added math/volume.cpp (#1796) 1 year ago

README.md

Prime factorization # {#section}

Prime Factorization is a very important and useful technique to factorize any number into its prime factors. It has various applications in the field of number theory.

The method of prime factorization involves two function calls. First: Calculating all the prime number up till a certain range using the standard

   Sieve of Eratosthenes.

Second: Using the prime numbers to reduce the the given number and thus find all its prime factors.

The complexity of the solution involves approx. O(n logn) in calculating sieve of eratosthenes O(log n) in calculating the prime factors of the number. So in total approx. O(n logn).

Requirements: For compile you need the compiler flag for C++ 11