problem 27
some variants of prob 27 for akka, scala, list, array and list buffer performance
use some array buffers