Qualcomm interview question

few questions on algorithms