Qualcomm interview question

Not very difficult question