top | item 33900861 (no title) zhala | 3 years ago We've found that asking them to write a function to average a list of integers. That's filtered out a surprising number of "senior level" applicants. discuss order hn newest 6510|3 years ago with(arr)eval(`averaaaaaage=(${join`+`})/length`); acapybara|3 years ago [deleted] pklausler|3 years ago mean = liftA2 (/) sum length Kranar|3 years ago I mean that could satisfy the interviewer, but for me if I asked that question, I'd want an answer that protected against overflow and unfortunately the naive solution is prone to overflow. load replies (1) anyfoo|3 years ago Does that not have to be mean = liftA2 (/) sum (fromIntegral . length) ?
pklausler|3 years ago mean = liftA2 (/) sum length Kranar|3 years ago I mean that could satisfy the interviewer, but for me if I asked that question, I'd want an answer that protected against overflow and unfortunately the naive solution is prone to overflow. load replies (1) anyfoo|3 years ago Does that not have to be mean = liftA2 (/) sum (fromIntegral . length) ?
Kranar|3 years ago I mean that could satisfy the interviewer, but for me if I asked that question, I'd want an answer that protected against overflow and unfortunately the naive solution is prone to overflow. load replies (1)
6510|3 years ago
acapybara|3 years ago
[deleted]
pklausler|3 years ago
Kranar|3 years ago
anyfoo|3 years ago