Qualcomm Interview Question

How to optimize parallel sum.