Qualcomm interview question

Please rate your coding ability