Qualcomm interview question

How to optimize parallel sum.