I am very sad that you removed this exercise. It's one of my favorites of the whole lot of exercises, because it shows the vectorization of a classic problem that people would naturally address using for loops.