Question d’entretien chez Meta

Compute square root of a integer, without using the built-in sqrt method.

Réponses aux questions d'entretien

Utilisateur anonyme

19 mars 2014

Use binary search

2

Utilisateur anonyme

13 avr. 2014

Either the sqrt method as suggested, with special handling of numbers less than 1, or use exp(0.5 * log(x))