Pergunta de entrevista da empresa Microsoft

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

Respostas da entrevista

Sigiloso

11 de mar. de 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.

Sigiloso

6 de mai. de 2011

Did you mean the AKS algorithm?