Question: faster algorithm?

My algorithm counting the number of data points between consequitive positive integers in a list seems to be very slow. I suspect there may be a considerable improvement - please help see how to achieve it. If it can be done faster with zeros only, let it be so. See Thanks.


View on MapleNet or Download
View file details


Please Wait...