Data-Structures-and-Algorithms-in-cpp
Data-Structures-and-Algorithms-in-cpp copied to clipboard
Create Miller-Rabin_primalityTest.cpp
This code checks if a given number is likely to be a prime using the Miller-Rabin primality test, which is a probabilistic algorithm. The algorithm chooses a random number and tests whether it is a witness for the compositeness of the given number. This is repeated a number of times to increase the confidence in the result. If the number passes all tests, it is considered likely to be prime.
Thanks for opening this pull request! Please be sure that you have checked out our contributing guidelines.