5 ms·
Well, the man wrote a game engine in JavaScript, so asking him to implement a sqrt() function in JavaScript isn't unheard of. They don't ask "math trivia" quest
by rudiger 16y ago
Well, the man wrote a game engine in JavaScript, so asking him to implement a sqrt() function in JavaScript isn't unheard of. They don't ask "math trivia" questions of every interviewee, but here it seems relevant.
Not to diminish the awesome work this guy has done.
- othello 16y agoWhen you're writing a game engine, your main concern is performance. Not using the built-in javascript sqrt() and rolling out your own would be woefully inefficient. That question would have made more sense for an engine in C, building your own fixed-point sqrt() for example.
- mhd 16y agosqrt and its approximations seems a bit too low-level, both for what he did and what Facebook is doing. This is the kind of stuff you look up, as opposed to other algorithmic difficulties that arise out of total different situations where without a good general background you wouldn't even know what to research. Questions about trees, graphs etc. would seem more appropriate for game development (and probably for Facebook in general). But that's just me. Sqrt might even be a good question if he's a recent graduate and they want to see if he still can think back a couple of years...