aryan-upa / SpecialNumberPrograms

Special Number Implementations in several languages.
3 stars 8 forks source link

better implementation of checking for a prime number in c++ #36

Closed sky-full-of-stars closed 1 year ago

sky-full-of-stars commented 1 year ago

Time complexity changed from O(n) to O(sqrt(n)).

sky-full-of-stars commented 1 year ago

@aryan-upa Can you check this PR once?