Qualcomm Interview Question

Not very difficult question