Qualcomm interview question

medium questions