4 ms·
I used to ask them to find average of array of ints. For bonus points to make code bullet-proof (what if someone passes null array, what if integer overflow hap
by ivanche 12y ago
I used to ask them to find average of array of ints. For bonus points to make code bullet-proof (what if someone passes null array, what if integer overflow happens etc). Surprisingly how many candidates failed because they used integer division (in Java), and how many didn't even think that something can be null...