Re:Ask HN: What is your go to idiot-filter question in inter...
by zhala on Wednesday December 07, 2022 @04:56PM
(#33900861)
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.
[ Parent
| on HN ]
Re:Ask HN: What is your go to idiot-filter question in inter...
by 6510 on Thursday December 08, 2022 @03:18AM
(#33905587)
with(arr)eval(`averaaaaaage=(${join`+`})/length`);
Re:Ask HN: What is your go to idiot-filter question in inter...
by pklausler on Wednesday December 07, 2022 @05:20PM
(#33901162)
mean = liftA2 (/) sum length
Re:Ask HN: What is your go to idiot-filter question in inter...
by Kranar on Wednesday December 07, 2022 @05:34PM
(#33901318)
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.
Re:Ask HN: What is your go to idiot-filter question in inter...
by whatshisface on Wednesday December 07, 2022 @05:44PM
(#33901440)
That could turn in to a very complex question in that case because dividing too many separate sums before adding would introduce rounding error.