EvgenyKarkan / EKAlgorithms

EKAlgorithms contains some well known CS algorithms & data structures.
MIT License
2.42k stars 362 forks source link

Fix isPrime method. #95

Closed ahanmal closed 9 years ago

ahanmal commented 9 years ago

If number is divisible, it should return NO.

Reference #94.

EvgenyKarkan commented 9 years ago

Merged.

ahanmal commented 9 years ago

Thanks.

EvgenyKarkan commented 9 years ago

And you :)

stanislaw commented 9 years ago

@EvgenyKarkan , @ahanmal

I believe this error was introduced during "bulk upload" process when EKAlgorithms was in process of creation and setup. I think it would be great if in future we could add more test coverage to prevent things like this one in a future.

ahanmal commented 9 years ago

@stanislaw Adding some test coverage doesn't sound like a bad idea. I will add some. I remember adding this method to the repo when it was young, and then I guess during refactoring, it broke.

Expect a PR soon.

ahanmal commented 9 years ago

See #96