Domanda di colloquio di Microsoft

Write a function that determines whether a given number is a prime. Discuss perf improvements.

Risposte di colloquio

Anonimo

11 mar 2011

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.

Anonimo

6 mag 2011

Did you mean the AKS algorithm?