Write a function that determines whether a given number is a prime. Discuss perf improvements.
Utilisateur anonyme
I come form math background so this was a goldmine for me. I started with a brutforce solution, then jumped to a hash table + brutforce and then discussed some of the less known solutions, like AKM algorithm.