Question d’entretien chez Netflix

Implement atoi and itoa

Réponses aux questions d'entretien

Utilisateur anonyme

27 sept. 2010

Seriously? They ask that for senior software engineer job? lame q.

1

Utilisateur anonyme

27 sept. 2010

Yep (cuz i sat in that room, too)... over and over, same questions, like they all read the same book. Thing is they aren't doing that stuff day to day.... and the heavy heavy emphasis on "performance" is a little funny. These aren't space ships they're controlling, just transactions.

Utilisateur anonyme

23 oct. 2010

atoi: #include #include #include int main() { const char* s = "12345"; int sum = 0; int len = strlen(s); int multiplier = pow(10, len - 1); for (int i = 0;i < len;i++) { sum += (s[i] - '0') * multiplier; multiplier = multiplier / 10; } printf("%u\n", sum); }

Utilisateur anonyme

14 déc. 2010

int atoi(const char* s) { int sum = 0; for (char* x = s; x != ']0'; ++x) { sum = sum*10 + *x - '0'; } return sum; }

Utilisateur anonyme

14 déc. 2010

typo: for (char* x = s; *x != '\0'; ++x) {