Microsoft interview question

After implementing the above algorithm, how to perform parallelized computation